All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] qcow2: free allocated cluster on fail in qcow2_write_snapshots()
@ 2013-05-15  8:43 Wenchao Xia
  2013-05-15  8:43 ` [Qemu-devel] [PATCH 2/2] qcow2: cancel the modification on fail in qcow2_snapshot_create() Wenchao Xia
  2013-05-16  9:32 ` [Qemu-devel] [PATCH 1/2] qcow2: free allocated cluster on fail in qcow2_write_snapshots() Stefan Hajnoczi
  0 siblings, 2 replies; 5+ messages in thread
From: Wenchao Xia @ 2013-05-15  8:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, pbonzini, aliguori, Wenchao Xia, stefanha

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 block/qcow2-snapshot.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 992a5c8..a6065a9 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
@@ -268,6 +268,8 @@ static int qcow2_write_snapshots(BlockDriverState *bs)
     return 0;
 
 fail:
+    /* free the new snapshot table */
+    qcow2_free_clusters(bs, snapshots_offset, snapshots_size);
     return ret;
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-17  4:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15  8:43 [Qemu-devel] [PATCH 1/2] qcow2: free allocated cluster on fail in qcow2_write_snapshots() Wenchao Xia
2013-05-15  8:43 ` [Qemu-devel] [PATCH 2/2] qcow2: cancel the modification on fail in qcow2_snapshot_create() Wenchao Xia
2013-05-16  9:34   ` Stefan Hajnoczi
2013-05-16  9:32 ` [Qemu-devel] [PATCH 1/2] qcow2: free allocated cluster on fail in qcow2_write_snapshots() Stefan Hajnoczi
2013-05-17  4:58   ` Wenchao Xia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.