From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYqa-0006IY-0p for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:40:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsYqT-0000Nx-J2 for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:40:51 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:46232 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYqS-0000ND-Sp for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:40:45 -0400 Date: Thu, 5 Jun 2014 16:40:43 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140605144043.GA6287@irqsave.net> References: <1401977966-11664-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1401977966-11664-1-git-send-email-kwolf@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] rbd: Fix leaks in rbd_start_aio() error path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: benoit.canet@irqsave.net, josh.durgin@inktank.com, qemu-devel@nongnu.org, stefanha@redhat.com The Thursday 05 Jun 2014 =E0 16:19:26 (+0200), Kevin Wolf wrote : > Signed-off-by: Kevin Wolf > --- > block/rbd.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/block/rbd.c b/block/rbd.c > index 09af484..898fcfe 100644 > --- a/block/rbd.c > +++ b/block/rbd.c > @@ -684,13 +684,16 @@ static BlockDriverAIOCB *rbd_start_aio(BlockDrive= rState *bs, > } > =20 > if (r < 0) { > - goto failed; > + goto failed_completion; > } > =20 > return &acb->common; > =20 > +failed_completion: > + rbd_aio_release(c); > failed: > g_free(rcb); > + qemu_vfree(acb->bounce); > qemu_aio_release(acb); > return NULL; > } > --=20 > 1.8.3.1 >=20 Reviewed-by: Benoit Canet