Patchwork [09/11] blockdev: Plug memory leak in drive_uninit()

login
register
mail settings
Submitter Kevin Wolf
Date Feb. 10, 2011, 3:51 p.m.
Message ID <1297353086-4844-10-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/82618/
State New
Headers show

Comments

Kevin Wolf - Feb. 10, 2011, 3:51 p.m.
From: Markus Armbruster <armbru@redhat.com>

Started leaking in commit 1dae12e6.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@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);
 }