]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fixes for domains with no iothreads
authorJán Tomko <jtomko@redhat.com>
Thu, 18 Sep 2014 09:57:00 +0000 (11:57 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 18 Sep 2014 12:49:01 +0000 (14:49 +0200)
Plug a memory leak and silence a warning.

src/qemu/qemu_cgroup.c
src/qemu/qemu_process.c

index 9d3937030865d83c26b64cb7e98e9e2e6e764f28..7c6b2c16c6e314c85f8501980e8fba752ffab7bd 100644 (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;
     }
index 8853d273e5267c70d6a07c72cd157abe98a6c213..c5b6263d3c41718872d4903758b007a5cc757275 100644 (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,