> > -    if (VIR_APPEND_ELEMENT(list->items, list->nItems, item) < 0) {
> > -        VIR_FREE(item);
> > -        return -1;
> > -    }
> > +    if (VIR_APPEND_ELEMENT(list->items, list->nItems, item) < 0)
> > +        goto cleanup;
> >  
> > -    return 0;
> > +    tmp = NULL;
> > +    item = NULL;
> 
> This 'item = NULL' is not needed. VIR_APPEND_ELEMENT sets @item to NULL
> upon successful return. But I agree that it is hard to spot.

Oh, missed that one, thanks for the suggestion.

Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to