aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block-vmdk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block-vmdk.c b/block-vmdk.c
index 9b5fb7346a..843bf869d0 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)