From: Fam Zheng <famcool@gmail.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Christoph Hellwig <hch@lst.de>
Subject: [Qemu-devel] [PATCH 08/12] VMDK: vmdk_close for extents
Date: Sat, 4 Jun 2011 08:42:52 +0800 [thread overview]
Message-ID: <BANLkTi=hHBP8UPyPDN=oCf8bE9Pp2gyrZA@mail.gmail.com> (raw)
Signed-off-by: Fam Zheng <famcool@gmail.com>
---
block/vmdk.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index 1d74b62..bbab68a 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1086,10 +1086,15 @@ exit:
static void vmdk_close(BlockDriverState *bs)
{
+ int i;
BDRVVmdkState *s = bs->opaque;
- qemu_free(s->extents[0].l1_table);
- qemu_free(s->extents[0].l2_cache);
+ for (i = 0; i < s->num_extents; i++) {
+ qemu_free(s->extents[i].l1_table);
+ qemu_free(s->extents[i].l2_cache);
+ qemu_free(s->extents[i].l1_backup_table);
+ }
+ qemu_free(s->extents);
}
static int vmdk_flush(BlockDriverState *bs)
next reply other threads:[~2011-06-04 0:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-04 0:42 Fam Zheng [this message]
2011-06-18 16:48 ` [Qemu-devel] [PATCH 08/12] VMDK: vmdk_close for extents Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=hHBP8UPyPDN=oCf8bE9Pp2gyrZA@mail.gmail.com' \
--to=famcool@gmail.com \
--cc=hch@lst.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).