mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13: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
|
@ -43,7 +43,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
|
|||
/* Expand to 2x size to give enough room for manipulation. */
|
||||
dt_size *= 2;
|
||||
/* First allocate space in qemu for device tree */
|
||||
fdt = qemu_mallocz(dt_size);
|
||||
fdt = g_malloc0(dt_size);
|
||||
|
||||
dt_file_load_size = load_image(filename_path, fdt);
|
||||
if (dt_file_load_size < 0) {
|
||||
|
@ -68,7 +68,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
|
|||
return fdt;
|
||||
|
||||
fail:
|
||||
qemu_free(fdt);
|
||||
g_free(fdt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue