mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 06:43: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
|
@ -105,9 +105,9 @@ void smbios_add_field(int type, int offset, int len, void *data)
|
|||
|
||||
if (!smbios_entries) {
|
||||
smbios_entries_len = sizeof(uint16_t);
|
||||
smbios_entries = qemu_mallocz(smbios_entries_len);
|
||||
smbios_entries = g_malloc0(smbios_entries_len);
|
||||
}
|
||||
smbios_entries = qemu_realloc(smbios_entries, smbios_entries_len +
|
||||
smbios_entries = g_realloc(smbios_entries, smbios_entries_len +
|
||||
sizeof(*field) + len);
|
||||
field = (struct smbios_field *)(smbios_entries + smbios_entries_len);
|
||||
field->header.type = SMBIOS_FIELD_ENTRY;
|
||||
|
@ -192,10 +192,10 @@ int smbios_entry_add(const char *t)
|
|||
|
||||
if (!smbios_entries) {
|
||||
smbios_entries_len = sizeof(uint16_t);
|
||||
smbios_entries = qemu_mallocz(smbios_entries_len);
|
||||
smbios_entries = g_malloc0(smbios_entries_len);
|
||||
}
|
||||
|
||||
smbios_entries = qemu_realloc(smbios_entries, smbios_entries_len +
|
||||
smbios_entries = g_realloc(smbios_entries, smbios_entries_len +
|
||||
sizeof(*table) + size);
|
||||
table = (struct smbios_table *)(smbios_entries + smbios_entries_len);
|
||||
table->header.type = SMBIOS_TABLE_ENTRY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue