mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
xen: Fix unconditional freeing in xenDaemonListDefinedDomains()
Commit 790f0b3057787bb64da8c46c111ff8d3eff7b2af causes the contents of the names array to be freed even on success, resulting in no listing of defined but inactive Xen domains. Spotted by Jim Fehlig
This commit is contained in:
parent
8f147d16f1
commit
7cfbb17978
@ -4696,12 +4696,17 @@ xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames
|
||||
break;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
sexpr_free(root);
|
||||
return(ret);
|
||||
|
||||
error:
|
||||
for (i = 0; i < ret; ++i)
|
||||
VIR_FREE(names[i]);
|
||||
|
||||
sexpr_free(root);
|
||||
return(ret);
|
||||
ret = -1;
|
||||
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user