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 <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2014-09-04 16:37:11 -04:00
parent d3f0708e84
commit 114ebecd98

View File

@ -198,6 +198,9 @@ virStringFreeListCount(char **strings,
{
size_t i;
if (!strings)
return;
for (i = 0; i < count; i++)
VIR_FREE(strings[i]);