From: Ján Tomko Date: Wed, 3 Jun 2015 15:19:06 +0000 (+0200) Subject: Do not access the domain definition in qemuMonitorFindBalloonObjectPath X-Git-Tag: v1.2.17-rc1~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19c633c6785e7f1d9c241a82269f6ec793d654a1;p=thirdparty%2Flibvirt.git Do not access the domain definition in qemuMonitorFindBalloonObjectPath The monitor code does not hold the virDomainObjPtr lock and should not access the defitinion. --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 9add05c9da..6947b08942 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -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;