summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-08-28 13:56:12 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2014-08-29 17:10:18 +0100
commit8df3abfceef557551f00adac1618ddd6fe46f85c (patch)
tree428fc7799dfe8f1942e936fbb90bb20f9000b7a9
parent315859312628e581322fe44742f3a05d1549539a (diff)
downloadfocaccia-qemu-8df3abfceef557551f00adac1618ddd6fe46f85c.tar.gz
focaccia-qemu-8df3abfceef557551f00adac1618ddd6fe46f85c.zip
quorum: Fix leak of opts in quorum_open
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: BenoƮt Canet <benoit.canet@nodalink.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--block/quorum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/quorum.c b/block/quorum.c
index 0160fe3ae9..093382e8f5 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);