提交 00fa1555 编写于 作者: E Eric Blake

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.
上级 1ccc16c6
......@@ -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]);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册