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:
parent
8283ef9ea2
commit
0cfd40ac0c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user