mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
5b47b7c3d3
commit
756f51e408
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue