Plug a memory leak and silence a warning. --- src/qemu/qemu_cgroup.c | 2 +- src/qemu/qemu_process.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 9d39370..7c6b2c1 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -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; } diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 8853d27..c5b6263 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -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, -- 1.8.5.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list