提交 756f51e4 编写于 作者: D Dong Xu Wang 提交者: Kevin Wolf

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: NAndreas Färber <afaerber@suse.de>
Reviewed_by: Ray Wang <raywang@linux.vnet.ibm.com>
Signed-off-by: NDong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 5b47b7c3
...@@ -171,10 +171,10 @@ static void cloop_close(BlockDriverState *bs) ...@@ -171,10 +171,10 @@ static void cloop_close(BlockDriverState *bs)
{ {
BDRVCloopState *s = bs->opaque; BDRVCloopState *s = bs->opaque;
if (s->n_blocks > 0) { if (s->n_blocks > 0) {
free(s->offsets); g_free(s->offsets);
} }
free(s->compressed_block); g_free(s->compressed_block);
free(s->uncompressed_block); g_free(s->uncompressed_block);
inflateEnd(&s->zstream); inflateEnd(&s->zstream);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册