summaryrefslogtreecommitdiff
path: root/block-vmdk.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-22 13:51:48 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-22 13:51:48 +0000
commit5cbdd273fbf5e977d14b1f06976489d8e4625a68 (patch)
treeb825332bbd9c4bc988f7d3dbdf94ef5a2f6af4b0 /block-vmdk.c
parent34151a20ea237dd21dc1e39a0c25d715ed39d989 (diff)
Fix block-vmdk.c:vmdk_close() use-after-free, by Ed Maste.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4526 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-vmdk.c')
-rw-r--r--block-vmdk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block-vmdk.c b/block-vmdk.c
index 9b5fb7346..843bf869d 100644
--- a/block-vmdk.c
+++ b/block-vmdk.c
@@ -808,9 +808,9 @@ static void vmdk_close(BlockDriverState *bs)
qemu_free(s->l1_table);
qemu_free(s->l2_cache);
- bdrv_delete(s->hd);
// try to close parent image, if exist
vmdk_parent_close(s->hd);
+ bdrv_delete(s->hd);
}
static void vmdk_flush(BlockDriverState *bs)