The block map is allocated in vdi_open, but was never freed.

Signed-off-by: Kevin Wolf <kw...@redhat.com>
---
 block/vdi.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/block/vdi.c b/block/vdi.c
index 7dda522..02da6b4 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -949,6 +949,9 @@ static int vdi_create(const char *filename, 
QEMUOptionParameter *options)
 static void vdi_close(BlockDriverState *bs)
 {
     BDRVVdiState *s = bs->opaque;
+
+    g_free(s->bmap);
+
     migrate_del_blocker(s->migration_blocker);
     error_free(s->migration_blocker);
 }
-- 
1.7.6.4


Reply via email to