From 756f51e408febecdaff041f096527b820e857762 Mon Sep 17 00:00:00 2001 From: Dong Xu Wang Date: Wed, 2 Nov 2011 16:36:21 +0800 Subject: [PATCH] block/cloop: Use g_free instead of free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix mismatching allocation and deallocation: g_free should be used to pair with g_malloc. Reviewed-by: Andreas Färber Reviewed_by: Ray Wang Signed-off-by: Dong Xu Wang Signed-off-by: Kevin Wolf --- block/cloop.c | 6 +++--- 1 file 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); }