From 6ac5f3881fd9880f55e30c5f5bd9984d9d47fd62 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 22 Nov 2011 16:57:34 +0100 Subject: vdi: Fix memory leak The block map is allocated in vdi_open, but was never freed. Signed-off-by: Kevin Wolf --- block/vdi.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- cgit v1.1