Patchwork [master+0.14,1/2] blockdev: Plug memory leak in drive_uninit()

login
register
mail settings
Submitter Markus Armbruster
Date Feb. 8, 2011, 2:12 p.m.
Message ID <1297174359-31888-2-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/82347/
State New
Headers show

Comments

Markus Armbruster - Feb. 8, 2011, 2:12 p.m.
Started leaking in commit 1dae12e6.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 blockdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/blockdev.c b/blockdev.c
index ecfadc1..24d7658 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -182,6 +182,7 @@  static void drive_uninit(DriveInfo *dinfo)
 {
     qemu_opts_del(dinfo->opts);
     bdrv_delete(dinfo->bdrv);
+    qemu_free(dinfo->id);
     QTAILQ_REMOVE(&drives, dinfo, next);
     qemu_free(dinfo);
 }