[libvirt] [PATCH 4/7] virsh-interface: Resolve Coverity issues
Daniel P. Berrange
berrange at redhat.com
Thu Jul 11 13:51:18 UTC 2013
On Thu, Jul 11, 2013 at 08:34:04AM -0400, John Ferlan wrote:
> Recent changes uncovered FORWARD_NULL and NEGATIVE_RETURNS problems with
> the processing of the 'nActiveIfaces' and 'nInactiveIfaces' and their
> associated allocated arrays in 'vshInterfaceListCollect' due to the
> possibility of returning -1 in a call and using the return value as a
> for loop index end condition.
Again, I think it is preferrable to change the for() condition
in the cleanup: label instead. I did that in several other places
in virsh code, but clearly missed this one & a few others.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list