Re: [PATCH 1/2] security: DAC: fix the transaction model's list append

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

 



> > -    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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux