summaryrefslogtreecommitdiff
path: root/block/parallels.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 /block/parallels.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (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 'block/parallels.c')
-rw-r--r--block/parallels.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/parallels.c b/block/parallels.c
index 35a14aa42..37d151dcb 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -88,7 +88,7 @@ static int parallels_open(BlockDriverState *bs, int flags)
s->tracks = le32_to_cpu(ph.tracks);
s->catalog_size = le32_to_cpu(ph.catalog_entries);
- s->catalog_bitmap = qemu_malloc(s->catalog_size * 4);
+ s->catalog_bitmap = g_malloc(s->catalog_size * 4);
if (bdrv_pread(bs->file, 64, s->catalog_bitmap, s->catalog_size * 4) !=
s->catalog_size * 4)
goto fail;
@@ -98,7 +98,7 @@ static int parallels_open(BlockDriverState *bs, int flags)
return 0;
fail:
if (s->catalog_bitmap)
- qemu_free(s->catalog_bitmap);
+ g_free(s->catalog_bitmap);
return -1;
}
@@ -137,7 +137,7 @@ static int parallels_read(BlockDriverState *bs, int64_t sector_num,
static void parallels_close(BlockDriverState *bs)
{
BDRVParallelsState *s = bs->opaque;
- qemu_free(s->catalog_bitmap);
+ g_free(s->catalog_bitmap);
}
static BlockDriver bdrv_parallels = {