]> xenbits.xensource.com Git - libvirt.git/commitdiff
Do not access the domain definition in qemuMonitorFindBalloonObjectPath
authorJán Tomko <jtomko@redhat.com>
Wed, 3 Jun 2015 15:19:06 +0000 (17:19 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 5 Jun 2015 14:19:07 +0000 (16:19 +0200)
The monitor code does not hold the virDomainObjPtr lock and should
not access the defitinion.

src/qemu/qemu_monitor.c

index 9add05c9da0931eef61164493baa63227243f1de..6947b089428d04149a45553338e7e40c692a2e7b 100644 (file)
@@ -1091,7 +1091,6 @@ qemuMonitorFindBalloonObjectPath(qemuMonitorPtr mon)
     int ret = -1;
     char *path = NULL;
     qemuMonitorJSONListPathPtr *bprops = NULL;
-    virDomainObjPtr vm = mon->vm;
 
     if (mon->balloonpath) {
         return 0;
@@ -1101,15 +1100,6 @@ qemuMonitorFindBalloonObjectPath(qemuMonitorPtr mon)
         return -1;
     }
 
-    /* Not supported */
-    if (!vm->def->memballoon ||
-        vm->def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("Memory balloon model must be virtio to "
-                         "get memballoon path"));
-        return -1;
-    }
-
     if (qemuMonitorJSONFindLinkPath(mon, "virtio-balloon-pci", &path) < 0)
         return -1;