qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] rbd: Fix leaks in rbd_start_aio() error path


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] rbd: Fix leaks in rbd_start_aio() error path
Date: Thu, 5 Jun 2014 16:18:41 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 05.06.2014 um 16:15 hat Benoît Canet geschrieben:
> The Thursday 05 Jun 2014 à 15:55:27 (+0200), Kevin Wolf wrote :
> > Signed-off-by: Kevin Wolf <address@hidden>
> > ---
> >  block/rbd.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > 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(BlockDriverState *bs,
> >      }
> >  
> >      if (r < 0) {
> > -        goto failed;
> > +        goto failed_completion;
> >      }
> >  
> >      return &acb->common;
> >  
> > +failed_completion:
> > +    rbd_aio_release(c);
> >  failed:
> >      g_free(rcb);
> > +    g_free(acb->bounce);
> 
> Err, Isn't it blockaligned ? (qemu_vfree) ?

*sigh* Yes, the patch was too trivial to get it right. Thanks for
catching this.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]