Received: from eggs.gnu.org ([2001:4830:134:3::10]:49499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYVT-0002by-JK for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:19:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsYVE-0006Fj-IE for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:19:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsYVE-0006FY-84 for qemu-devel@nongnu.org; Thu, 05 Jun 2014 10:18:48 -0400 Date: Thu, 5 Jun 2014 16:18:41 +0200 From: Kevin Wolf Message-ID: <20140605141841.GE4885@noname.redhat.com> References: <1401976527-10131-1-git-send-email-kwolf@redhat.com> <20140605141514.GA6109@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20140605141514.GA6109@irqsave.net> 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: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: josh.durgin@inktank.com, qemu-devel@nongnu.org, stefanha@redhat.com Am 05.06.2014 um 16:15 hat Beno=EEt Canet geschrieben: > 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(BlockDri= verState *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); >=20 > Err, Isn't it blockaligned ? (qemu_vfree) ? *sigh* Yes, the patch was too trivial to get it right. Thanks for catching this. Kevin