From 8df3abfceef557551f00adac1618ddd6fe46f85c Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Thu, 28 Aug 2014 13:56:12 +0800 Subject: quorum: Fix leak of opts in quorum_open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fam Zheng Reviewed-by: BenoƮt Canet Signed-off-by: Stefan Hajnoczi --- block/quorum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'block/quorum.c') 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); -- cgit v1.2.3