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 /block/cloop.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 'block/cloop.c')
-rw-r--r-- | block/cloop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/cloop.c b/block/cloop.c index fe015c4255..8cff9f2cac 100644 --- a/block/cloop.c +++ b/block/cloop.c @@ -70,7 +70,7 @@ static int cloop_open(BlockDriverState *bs, int flags) /* read offsets */ offsets_size = s->n_blocks * sizeof(uint64_t); - s->offsets = qemu_malloc(offsets_size); + s->offsets = g_malloc(offsets_size); if (bdrv_pread(bs->file, 128 + 4 + 4, s->offsets, offsets_size) < offsets_size) { goto cloop_close; @@ -85,8 +85,8 @@ static int cloop_open(BlockDriverState *bs, int flags) } /* initialize zlib engine */ - s->compressed_block = qemu_malloc(max_compressed_block_size+1); - s->uncompressed_block = qemu_malloc(s->block_size); + s->compressed_block = g_malloc(max_compressed_block_size+1); + s->uncompressed_block = g_malloc(s->block_size); if(inflateInit(&s->zstream) != Z_OK) goto cloop_close; s->current_block=s->n_blocks; |