mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
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:
parent
d3f0708e84
commit
114ebecd98
@ -198,6 +198,9 @@ virStringFreeListCount(char **strings,
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (!strings)
|
||||
return;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
VIR_FREE(strings[i]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user