Re: [PATCH] Resolve Coverity complaints in tests/securityselinuxlabeltest.c

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

 



On Wed, Jul 03, 2013 at 10:05:58AM -0400, John Ferlan wrote:
> Two complaints of RESOURCE_FREE due to going to cleanup prior to a
> VIR_FREE(line).  Two complaints of FORWARD_NULL due to 'tmp' being
> accessed after a strchr() without first checking if the return was NULL.
> 
> While looking at the code it seems that 'line' need only be allocated
> once as the while loop will keep reading into line until eof causing
> an unreported leak since line was never VIR_FREE()'d at the bottom of
> the loop.
> ---
>  tests/securityselinuxlabeltest.c | 30 +++++++++++++++++++-----------
>  1 file changed, 19 insertions(+), 11 deletions(-)


ACK


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 :|

--
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]