提交 3c132638 编写于 作者: H Hu Tao 提交者: Wen Congyang

free memory properly in cleanup patch

virsh schedinfo inactive-domain will trigger the problem.
上级 6fee3da2
......@@ -945,8 +945,11 @@ remoteDispatchDomainGetSchedulerParameters(struct qemud_server *server ATTRIBUTE
cleanup:
if (rv < 0) {
remoteDispatchError(rerr);
for (i = 0 ; i < nparams ; i++)
VIR_FREE(ret->params.params_val[i].field);
if (ret->params.params_val) {
for (i = 0 ; i < nparams ; i++)
VIR_FREE(ret->params.params_val[i].field);
VIR_FREE(ret->params.params_val);
}
}
if (dom)
virDomainFree(dom);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册