qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 35/35] quorum: Fix leak of opts in quorum_open


From: Stefan Hajnoczi
Subject: [Qemu-devel] [PULL 35/35] quorum: Fix leak of opts in quorum_open
Date: Fri, 29 Aug 2014 17:30:03 +0100

From: Fam Zheng <address@hidden>

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: BenoƮt Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
 block/quorum.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/quorum.c b/block/quorum.c
index 0160fe3..093382e 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -868,7 +868,7 @@ static int quorum_open(BlockDriverState *bs, QDict 
*options, int flags,
 {
     BDRVQuorumState *s = bs->opaque;
     Error *local_err = NULL;
-    QemuOpts *opts;
+    QemuOpts *opts = NULL;
     bool *opened;
     QDict *sub = NULL;
     QList *list = NULL;
@@ -989,6 +989,7 @@ close_exit:
     g_free(s->bs);
     g_free(opened);
 exit:
+    qemu_opts_del(opts);
     /* propagate error */
     if (local_err) {
         error_propagate(errp, local_err);
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]