From: Fam Zheng Date: Thu, 28 Aug 2014 05:56:12 +0000 (+0800) Subject: quorum: Fix leak of opts in quorum_open X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~633^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8df3abfceef557551f00adac1618ddd6fe46f85c;p=sdk%2Femulator%2Fqemu.git quorum: Fix leak of opts in quorum_open Signed-off-by: Fam Zheng Reviewed-by: BenoƮt Canet Signed-off-by: Stefan Hajnoczi --- 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);