aboutsummaryrefslogtreecommitdiff
path: root/qdict.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /qdict.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
downloadqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.bz2
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 'qdict.c')
-rw-r--r--qdict.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/qdict.c b/qdict.c
index dee0fb4..4bf308b 100644
--- a/qdict.c
+++ b/qdict.c
@@ -35,7 +35,7 @@ QDict *qdict_new(void)
{
QDict *qdict;
- qdict = qemu_mallocz(sizeof(*qdict));
+ qdict = g_malloc0(sizeof(*qdict));
QOBJECT_INIT(qdict, &qdict_type);
return qdict;
@@ -75,8 +75,8 @@ static QDictEntry *alloc_entry(const char *key, QObject *value)
{
QDictEntry *entry;
- entry = qemu_mallocz(sizeof(*entry));
- entry->key = qemu_strdup(key);
+ entry = g_malloc0(sizeof(*entry));
+ entry->key = g_strdup(key);
entry->value = value;
return entry;
@@ -410,8 +410,8 @@ static void qentry_destroy(QDictEntry *e)
assert(e->value != NULL);
qobject_decref(e->value);
- qemu_free(e->key);
- qemu_free(e);
+ g_free(e->key);
+ g_free(e);
}
/**
@@ -452,5 +452,5 @@ static void qdict_destroy_obj(QObject *obj)
}
}
- qemu_free(qdict);
+ g_free(qdict);
}