aboutsummaryrefslogtreecommitdiff
path: root/block/cloop.c
diff options
context:
space:
mode:
authorDong Xu Wang <wdongxu@linux.vnet.ibm.com>2011-11-02 16:36:21 +0800
committerKevin Wolf <kwolf@redhat.com>2011-11-04 14:24:12 +0100
commit756f51e408febecdaff041f096527b820e857762 (patch)
tree713bb240c6200a0d255bf77bd6a7f87fe8221b6f /block/cloop.c
parent5b47b7c3d38e2fe23948313a8a6af227ba6d46a5 (diff)
block/cloop: Use g_free instead of free
Fix mismatching allocation and deallocation: g_free should be used to pair with g_malloc. Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed_by: Ray Wang <raywang@linux.vnet.ibm.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/cloop.c')
-rw-r--r--block/cloop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/cloop.c b/block/cloop.c
index 799b6c2125..7570eb8e74 100644
--- a/block/cloop.c
+++ b/block/cloop.c
@@ -171,10 +171,10 @@ static void cloop_close(BlockDriverState *bs)
{
BDRVCloopState *s = bs->opaque;
if (s->n_blocks > 0) {
- free(s->offsets);
+ g_free(s->offsets);
}
- free(s->compressed_block);
- free(s->uncompressed_block);
+ g_free(s->compressed_block);
+ g_free(s->uncompressed_block);
inflateEnd(&s->zstream);
}