Patchwork block/qcow2.c : call qcow2_free_snapshots in the function of qcow2_close

login
register
mail settings
Submitter Zhi Hui Li
Date Dec. 7, 2011, 9:25 a.m.
Message ID <1323249948-31714-1-git-send-email-zhihuili@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/129920/
State New
Headers show

Comments

Zhi Hui Li - Dec. 7, 2011, 9:25 a.m.
Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>
---
 block/qcow2.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Stefan Hajnoczi - Dec. 7, 2011, 10:13 a.m.
On Wed, Dec 7, 2011 at 9:25 AM, Li Zhi Hui <zhihuili@linux.vnet.ibm.com> wrote:
> Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>
> ---
>  block/qcow2.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Kevin Wolf - Dec. 7, 2011, 10:20 a.m.
Am 07.12.2011 10:25, schrieb Li Zhi Hui:
> Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>
> ---
>  block/qcow2.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Thanks, applied to the block branch.

Kevin

Patch

diff --git a/block/qcow2.c b/block/qcow2.c
index 37cd442..aa32e8d 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -635,6 +635,7 @@  static void qcow2_close(BlockDriverState *bs)
     g_free(s->cluster_cache);
     qemu_vfree(s->cluster_data);
     qcow2_refcount_close(bs);
+    qcow2_free_snapshots(bs);
 }
 
 static void qcow2_invalidate_cache(BlockDriverState *bs)