From: John Ferlan Date: Thu, 4 Sep 2014 20:37:11 +0000 (-0400) Subject: virstring: Resolve Coverity FORWARD_NULL X-Git-Tag: CVE-2014-3633~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=114ebecd98a93c2a751f53dc63716a7564c71b11;p=thirdparty%2Flibvirt.git virstring: Resolve Coverity FORWARD_NULL Perhaps a false positive, but since Coverity doesn't understand the relationship between the 'count' and the 'strings', rather than leave the chance the on input 'strings' is NULL and causes a deref - just check for it and return Signed-off-by: John Ferlan --- diff --git a/src/util/virstring.c b/src/util/virstring.c index b14f785f13..935f0c6755 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -198,6 +198,9 @@ virStringFreeListCount(char **strings, { size_t i; + if (!strings) + return; + for (i = 0; i < count; i++) VIR_FREE(strings[i]);