From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMeLb-0005uG-Lw for qemu-devel@nongnu.org; Wed, 27 Aug 2014 10:37:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMeLW-0002zv-Dq for qemu-devel@nongnu.org; Wed, 27 Aug 2014 10:37:15 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:39038 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMeLW-0002zp-7i for qemu-devel@nongnu.org; Wed, 27 Aug 2014 10:37:10 -0400 Date: Wed, 27 Aug 2014 16:36:22 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140827143622.GH31176@irqsave.net> References: <1409119356-22742-1-git-send-email-famz@redhat.com> <1409119356-22742-4-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1409119356-22742-4-git-send-email-famz@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/4] quorum: Fix leak of opts in quorum_open List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi The Wednesday 27 Aug 2014 =E0 14:02:35 (+0800), Fam Zheng wrote : > Signed-off-by: Fam Zheng > --- > block/quorum.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/block/quorum.c b/block/quorum.c > index 0de07bb..ffe8bd9 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -796,7 +796,7 @@ static int quorum_open(BlockDriverState *bs, QDict = *options, int flags, > { > BDRVQuorumState *s =3D bs->opaque; > Error *local_err =3D NULL; > - QemuOpts *opts; > + QemuOpts *opts =3D NULL; > bool *opened; > QDict *sub =3D NULL; > QList *list =3D NULL; > @@ -908,6 +908,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); > --=20 > 2.1.0 >=20 >=20 Reviewed-by: Beno=EEt Canet