diff options
author | Fam Zheng <famz@redhat.com> | 2014-08-28 13:56:12 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-08-29 17:10:18 +0100 |
commit | 8df3abfceef557551f00adac1618ddd6fe46f85c (patch) | |
tree | 428fc7799dfe8f1942e936fbb90bb20f9000b7a9 /block/quorum.c | |
parent | 315859312628e581322fe44742f3a05d1549539a (diff) | |
download | 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>
Diffstat (limited to 'block/quorum.c')
-rw-r--r-- | block/quorum.c | 3 |
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); |