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 /hw/eeprom93xx.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 'hw/eeprom93xx.c')
-rw-r--r-- | hw/eeprom93xx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/eeprom93xx.c b/hw/eeprom93xx.c index 7b21f98e22..4c7158d1a5 100644 --- a/hw/eeprom93xx.c +++ b/hw/eeprom93xx.c @@ -310,7 +310,7 @@ eeprom_t *eeprom93xx_new(DeviceState *dev, uint16_t nwords) addrbits = 6; } - eeprom = (eeprom_t *)qemu_mallocz(sizeof(*eeprom) + nwords * 2); + eeprom = (eeprom_t *)g_malloc0(sizeof(*eeprom) + nwords * 2); eeprom->size = nwords; eeprom->addrbits = addrbits; /* Output DO is tristate, read results in 1. */ @@ -325,7 +325,7 @@ void eeprom93xx_free(DeviceState *dev, eeprom_t *eeprom) /* Destroy EEPROM. */ logout("eeprom = 0x%p\n", eeprom); vmstate_unregister(dev, &vmstate_eeprom, eeprom); - qemu_free(eeprom); + g_free(eeprom); } uint16_t *eeprom93xx_data(eeprom_t *eeprom) |