From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNP5E-0000SI-Sl for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:31:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNP58-00036N-KT for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:31:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNP58-00036B-Dk for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:31:22 -0400 From: Stefan Hajnoczi Date: Fri, 29 Aug 2014 17:30:03 +0100 Message-Id: <1409329803-20744-36-git-send-email-stefanha@redhat.com> In-Reply-To: <1409329803-20744-1-git-send-email-stefanha@redhat.com> References: <1409329803-20744-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 35/35] quorum: Fix leak of opts in quorum_open List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Fam Zheng , Stefan Hajnoczi From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Beno=C3=AEt Canet Signed-off-by: Stefan Hajnoczi --- block/quorum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 *o= ptions, 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; @@ -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); --=20 1.9.3