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

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



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


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