qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vdi: Fix memory leak
@ 2011-11-22 16:16 Kevin Wolf
  2011-11-22 18:37 ` Stefan Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2011-11-22 16:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, sw

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

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
Applies on top if the migration blocker series.

 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-23  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 16:16 [Qemu-devel] [PATCH] vdi: Fix memory leak Kevin Wolf
2011-11-22 18:37 ` Stefan Weil
2011-11-23  8:26   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).