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 /test-qmp-commands.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 'test-qmp-commands.c')
-rw-r--r-- | test-qmp-commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test-qmp-commands.c b/test-qmp-commands.c index 775290439a..f142cc616d 100644 --- a/test-qmp-commands.c +++ b/test-qmp-commands.c @@ -15,15 +15,15 @@ void qmp_user_def_cmd1(UserDefOne * ud1, Error **errp) UserDefTwo * qmp_user_def_cmd2(UserDefOne * ud1a, UserDefOne * ud1b, Error **errp) { UserDefTwo *ret; - UserDefOne *ud1c = qemu_mallocz(sizeof(UserDefOne)); - UserDefOne *ud1d = qemu_mallocz(sizeof(UserDefOne)); + UserDefOne *ud1c = g_malloc0(sizeof(UserDefOne)); + UserDefOne *ud1d = g_malloc0(sizeof(UserDefOne)); ud1c->string = strdup(ud1a->string); ud1c->integer = ud1a->integer; ud1d->string = strdup(ud1b->string); ud1d->integer = ud1b->integer; - ret = qemu_mallocz(sizeof(UserDefTwo)); + ret = g_malloc0(sizeof(UserDefTwo)); ret->string = strdup("blah1"); ret->dict.string = strdup("blah2"); ret->dict.dict.userdef = ud1c; |