[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] qcow2: free allocated cluster on fail in qcow2_
From: |
Wenchao Xia |
Subject: |
[Qemu-devel] [PATCH 1/2] qcow2: free allocated cluster on fail in qcow2_write_snapshots() |
Date: |
Wed, 15 May 2013 16:43:38 +0800 |
Signed-off-by: Wenchao Xia <address@hidden>
---
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
- [Qemu-devel] [PATCH 1/2] qcow2: free allocated cluster on fail in qcow2_write_snapshots(),
Wenchao Xia <=