diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 22:09:37 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 23:01:08 -0500 |
commit | 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch) | |
tree | 9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/qdev-properties.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (diff) |
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev-properties.c')
-rw-r--r-- | hw/qdev-properties.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index eff2d24945..0c0c29212d 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -275,14 +275,14 @@ static int parse_string(DeviceState *dev, Property *prop, const char *str) char **ptr = qdev_get_prop_ptr(dev, prop); if (*ptr) - qemu_free(*ptr); - *ptr = qemu_strdup(str); + g_free(*ptr); + *ptr = g_strdup(str); return 0; } static void free_string(DeviceState *dev, Property *prop) { - qemu_free(*(char **)qdev_get_prop_ptr(dev, prop)); + g_free(*(char **)qdev_get_prop_ptr(dev, prop)); } static int print_string(DeviceState *dev, Property *prop, char *dest, size_t len) @@ -768,7 +768,7 @@ static int qdev_add_one_global(QemuOpts *opts, void *opaque) { GlobalProperty *g; - g = qemu_mallocz(sizeof(*g)); + g = g_malloc0(sizeof(*g)); g->driver = qemu_opt_get(opts, "driver"); g->property = qemu_opt_get(opts, "property"); g->value = qemu_opt_get(opts, "value"); |