aboutsummaryrefslogtreecommitdiff
path: root/hw/sd.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/sd.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
downloadqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.bz2
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/sd.c')
-rw-r--r--hw/sd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/sd.c b/hw/sd.c
index c2c80ab..bb8c2ff 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -409,9 +409,9 @@ static void sd_reset(SDState *sd, BlockDriverState *bdrv)
sd->bdrv = bdrv;
if (sd->wp_groups)
- qemu_free(sd->wp_groups);
+ g_free(sd->wp_groups);
sd->wp_switch = bdrv ? bdrv_is_read_only(bdrv) : 0;
- sd->wp_groups = (int *) qemu_mallocz(sizeof(int) * sect);
+ sd->wp_groups = (int *) g_malloc0(sizeof(int) * sect);
memset(sd->function_group, 0, sizeof(int) * 6);
sd->erase_start = 0;
sd->erase_end = 0;
@@ -443,7 +443,7 @@ SDState *sd_init(BlockDriverState *bs, int is_spi)
{
SDState *sd;
- sd = (SDState *) qemu_mallocz(sizeof(SDState));
+ sd = (SDState *) g_malloc0(sizeof(SDState));
sd->buf = qemu_blockalign(bs, 512);
sd->spi = is_spi;
sd->enable = 1;