Received: from eggs.gnu.org ([2001:4830:134:3::10]:48321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYRx-0008EM-Rz for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsYRo-00054l-Uk for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:15:25 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:46226 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYRo-00053x-Or for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:15:16 -0400 Date: Thu, 5 Jun 2014 16:15:14 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140605141514.GA6109@irqsave.net> References: <1401976527-10131-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: <1401976527-10131-1-git-send-email-kwolf@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] 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 15:55:27 (+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..94e2bfd 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); > + g_free(acb->bounce); Err, Isn't it blockaligned ? (qemu_vfree) ? > qemu_aio_release(acb); > return NULL; > } > --=20 > 1.8.3.1 >=20 >=20