提交 7cfbb179 编写于 作者: M Matthias Bolte

xen: Fix unconditional freeing in xenDaemonListDefinedDomains()

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