diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-06-01 10:50:00 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-06-08 11:56:40 +0200 |
commit | 80fa3341a70151d250be92ae900e3c1580817540 (patch) | |
tree | 890de6480719897bcd67dbd1e9a2c346401a922e /block/qcow2-cluster.c | |
parent | 30cdc48cc8c9ad28e1b95460021d0c121b3ed4f4 (diff) | |
download | qemu-80fa3341a70151d250be92ae900e3c1580817540.zip qemu-80fa3341a70151d250be92ae900e3c1580817540.tar.gz qemu-80fa3341a70151d250be92ae900e3c1580817540.tar.bz2 |
qcow2: Fix memory leaks in error cases
This fixes memory leaks that may be caused by I/O errors during L1 table growth
(can happen during save_vm) and in qemu-img check.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2-cluster.c')
-rw-r--r-- | block/qcow2-cluster.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 750abe3..c9e7bbd 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -70,7 +70,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, int min_size, bool exact_size) ret = qcow2_cache_flush(bs, s->refcount_block_cache); if (ret < 0) { - return ret; + goto fail; } BLKDBG_EVENT(bs->file, BLKDBG_L1_GROW_WRITE_TABLE); |