From 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sat, 20 Aug 2011 22:09:37 -0500 Subject: Use glib memory allocation and free functions qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori --- hw/smbios.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/smbios.c') diff --git a/hw/smbios.c b/hw/smbios.c index a3ae1de824..8f2e965387 100644 --- a/hw/smbios.c +++ b/hw/smbios.c @@ -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; -- cgit 1.4.1