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-visitor.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-visitor.c')
-rw-r--r-- | test-visitor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test-visitor.c b/test-visitor.c index 5133ad6b19..b7717deb6d 100644 --- a/test-visitor.c +++ b/test-visitor.c @@ -191,11 +191,11 @@ static void test_nested_structs(void) g_assert(!g_strcmp0(ud1c_p->string, ud1_p->string)); g_assert(!g_strcmp0(ud2c_p->dict.dict2.string, ud2.dict.dict2.string)); - qemu_free(ud1.string); - qemu_free(ud2.string); - qemu_free(ud2.dict.string); - qemu_free(ud2.dict.dict.string); - qemu_free(ud2.dict.dict2.string); + g_free(ud1.string); + g_free(ud2.string); + g_free(ud2.dict.string); + g_free(ud2.dict.dict.string); + g_free(ud2.dict.dict2.string); qapi_free_UserDefTwo(ud2c_p); @@ -251,7 +251,7 @@ static void test_nested_enums(void) QObject *obj; QString *str; - nested_enums = qemu_mallocz(sizeof(NestedEnumsOne)); + nested_enums = g_malloc0(sizeof(NestedEnumsOne)); nested_enums->enum1 = ENUM_ONE_VALUE1; nested_enums->enum2 = ENUM_ONE_VALUE2; nested_enums->enum3 = ENUM_ONE_VALUE3; |