Fixes for domains with no iothreads

Plug a memory leak and silence a warning.
This commit is contained in:
Ján Tomko 2014-09-18 11:57:00 +02:00
parent 5b5631dedf
commit c1480871bb
2 changed files with 5 additions and 3 deletions

View File

@ -1131,7 +1131,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm)
if (priv->cgroup == NULL)
return 0;
if (priv->niothreadpids == 0) {
if (def->iothreads && priv->niothreadpids == 0) {
VIR_WARN("Unable to get iothreads' pids.");
return 0;
}

View File

@ -2117,8 +2117,10 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver,
goto cleanup;
/* Nothing to do */
if (niothreads == 0)
return 0;
if (niothreads == 0) {
ret = 0;
goto cleanup;
}
if (niothreads != vm->def->iothreads) {
virReportError(VIR_ERR_INTERNAL_ERROR,