]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Update balloon info only if job is allowed
authorPeter Krempa <pkrempa@redhat.com>
Thu, 4 Jun 2015 11:47:02 +0000 (13:47 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 4 Jun 2015 12:04:48 +0000 (14:04 +0200)
In qemuDomainUpdateCurrentMemorySize I misplaced the actual update of
the balloon size to a place where it may not be initialized. Move it a
few lines above.

src/qemu/qemu_domain.c

index 3826b2fce3b8d6e3702c3a6eb0790af290462bca..0682390e833e0971478e721ff36c36f715e1630a 100644 (file)
@@ -3256,9 +3256,9 @@ qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver,
 
         if (ret < 0)
             return -1;
-    }
 
-    vm->def->mem.cur_balloon = balloon;
+        vm->def->mem.cur_balloon = balloon;
+    }
 
     return 0;
 }