mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 04:55:18 +00:00
openvz: fix logic bug in previous patch
We want to free names on failure, not on success. * src/openvz/openvz_driver.c (openvzListDefinedDomains): Use correct condition.
This commit is contained in:
parent
1ccc16c603
commit
00fa155578
@ -1492,7 +1492,7 @@ static int openvzListDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
out:
|
||||
VIR_FORCE_CLOSE(outfd);
|
||||
virCommandFree(cmd);
|
||||
if (rc >= 0) {
|
||||
if (rc < 0) {
|
||||
for ( ; got >= 0 ; got--)
|
||||
VIR_FREE(names[got]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user