mirror of https://gitee.com/openkylin/libvirt.git
Fixes for domains with no iothreads
Plug a memory leak and silence a warning.
This commit is contained in:
parent
5b5631dedf
commit
c1480871bb
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue