mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
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>
This commit is contained in:
parent
14015304b6
commit
7267c0947d
357 changed files with 1672 additions and 1674 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue