Commit 5cbdd273fbf5e977d14b1f06976489d8e4625a68

Authored by ths
1 parent 34151a20

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
Showing 1 changed file with 1 additions and 1 deletions
block-vmdk.c
@@ -808,9 +808,9 @@ static void vmdk_close(BlockDriverState *bs) @@ -808,9 +808,9 @@ static void vmdk_close(BlockDriverState *bs)
808 808
809 qemu_free(s->l1_table); 809 qemu_free(s->l1_table);
810 qemu_free(s->l2_cache); 810 qemu_free(s->l2_cache);
811 - bdrv_delete(s->hd);  
812 // try to close parent image, if exist 811 // try to close parent image, if exist
813 vmdk_parent_close(s->hd); 812 vmdk_parent_close(s->hd);
  813 + bdrv_delete(s->hd);
814 } 814 }
815 815
816 static void vmdk_flush(BlockDriverState *bs) 816 static void vmdk_flush(BlockDriverState *bs)