]> git.proxmox.com Git - qemu.git/commitdiff
vdi: Fix memory leak
authorKevin Wolf <kwolf@redhat.com>
Tue, 22 Nov 2011 15:57:34 +0000 (16:57 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 23 Nov 2011 16:04:05 +0000 (17:04 +0100)
The block map is allocated in vdi_open, but was never freed.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vdi.c

index 7dda5222eb4c9c984df5d0d98157ecee0cc49c7f..02da6b44d045eb558a0ef0f3b4a613b1868e633e 100644 (file)
@@ -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);
 }