1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

virsh-domain-monitor: Resolve Coverity issues

Recent changes uncovered a pair of NEGATIVE_RETURNS when processing the
'nnames' in 'vshDomainListCollect' in the for loop due to possible -1 value.
This commit is contained in:
John Ferlan 2013-07-11 10:28:44 -04:00
parent 8283ef9ea2
commit 0cfd40ac0c

View File

@ -1599,7 +1599,7 @@ finished:
success = true;
cleanup:
for (i = 0; i < nnames; i++)
for (i = 0; nnames != -1 && i < nnames; i++)
VIR_FREE(names[i]);
if (!success) {