From: Dong Xu Wang <wdon...@linux.vnet.ibm.com>

Fix mismatching allocation and deallocation: g_free should be used to pair with
g_malloc.

Reviewed-by: Andreas Färber <afaer...@suse.de>
Reviewed_by: Ray Wang <rayw...@linux.vnet.ibm.com>
Signed-off-by: Dong Xu Wang <wdon...@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kw...@redhat.com>
---
 block/cloop.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/cloop.c b/block/cloop.c
index 799b6c2..7570eb8 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);
 }
 
-- 
1.7.6.4


Reply via email to