aboutsummaryrefslogtreecommitdiff
path: root/test-qmp-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-qmp-commands.c')
-rw-r--r--test-qmp-commands.c6
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;