aboutsummaryrefslogtreecommitdiff
path: root/qapi/qmp-output-visitor.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 /qapi/qmp-output-visitor.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (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 'qapi/qmp-output-visitor.c')
-rw-r--r--qapi/qmp-output-visitor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/qapi/qmp-output-visitor.c b/qapi/qmp-output-visitor.c
index c398cac4f0..4419a31644 100644
--- a/qapi/qmp-output-visitor.c
+++ b/qapi/qmp-output-visitor.c
@@ -42,7 +42,7 @@ static QmpOutputVisitor *to_qov(Visitor *v)
static void qmp_output_push_obj(QmpOutputVisitor *qov, QObject *value)
{
- QStackEntry *e = qemu_mallocz(sizeof(*e));
+ QStackEntry *e = g_malloc0(sizeof(*e));
e->value = value;
QTAILQ_INSERT_HEAD(&qov->stack, e, node);
@@ -54,7 +54,7 @@ static QObject *qmp_output_pop(QmpOutputVisitor *qov)
QObject *value;
QTAILQ_REMOVE(&qov->stack, e, node);
value = e->value;
- qemu_free(e);
+ g_free(e);
return value;
}
@@ -210,17 +210,17 @@ void qmp_output_visitor_cleanup(QmpOutputVisitor *v)
if (e->value) {
qobject_decref(e->value);
}
- qemu_free(e);
+ g_free(e);
}
- qemu_free(v);
+ g_free(v);
}
QmpOutputVisitor *qmp_output_visitor_new(void)
{
QmpOutputVisitor *v;
- v = qemu_mallocz(sizeof(*v));
+ v = g_malloc0(sizeof(*v));
v->visitor.start_struct = qmp_output_start_struct;
v->visitor.end_struct = qmp_output_end_struct;