[virt-tools-list] [libosinfo 2/2] loader: Fix one newly introduced leak

Christophe Fergeau cfergeau at redhat.com
Fri Dec 7 12:21:02 UTC 2012


On Fri, Dec 07, 2012 at 12:10:04PM +0100, Michal Privoznik wrote:
> On 07.12.2012 09:30, Christophe Fergeau wrote:
> > This is a follow-up to my previous series fixing leaks as a similar
> > one was just introduced.
> > ---
> >  osinfo/osinfo_loader.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
> > index 62b92f9..e630793 100644
> > --- a/osinfo/osinfo_loader.c
> > +++ b/osinfo/osinfo_loader.c
> > @@ -961,8 +961,10 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
> >      }
> >  
> >      gint nnodes = osinfo_loader_nodeset("./*", ctxt, &nodes, err);
> > -    if (error_is_set(err))
> > +    if (error_is_set(err)) {
> > +        g_object_unref(G_OBJECT(driver));
> >          return NULL;
> > +    }
> >  
> >      for (i = 0 ; i < nnodes ; i++) {
> >          if (nodes[i]->children &&
> > 
> 
> Fortunately, both these patches looks sane. ACK.

Thanks, I've pushed the 2nd patch as the first one was already in.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20121207/6a11d29d/attachment.sig>


More information about the virt-tools-list mailing list