提交 c1480871 编写于 作者: J Ján Tomko

Fixes for domains with no iothreads

Plug a memory leak and silence a warning.
上级 5b5631de
...@@ -1131,7 +1131,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm) ...@@ -1131,7 +1131,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm)
if (priv->cgroup == NULL) if (priv->cgroup == NULL)
return 0; return 0;
if (priv->niothreadpids == 0) { if (def->iothreads && priv->niothreadpids == 0) {
VIR_WARN("Unable to get iothreads' pids."); VIR_WARN("Unable to get iothreads' pids.");
return 0; return 0;
} }
......
...@@ -2117,8 +2117,10 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, ...@@ -2117,8 +2117,10 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver,
goto cleanup; goto cleanup;
/* Nothing to do */ /* Nothing to do */
if (niothreads == 0) if (niothreads == 0) {
return 0; ret = 0;
goto cleanup;
}
if (niothreads != vm->def->iothreads) { if (niothreads != vm->def->iothreads) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册