From: Jiri Denemark Date: Thu, 3 Mar 2016 12:26:51 +0000 (+0100) Subject: qemu: Check if domain is active in GetControlInfo X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e53f2dc875f5c4865a37a2bd936858f45b23ee8e;p=libvirt.git qemu: Check if domain is active in GetControlInfo Reporting status of a control connection makes no sense for an inactive domain. https://bugzilla.redhat.com/show_bug.cgi?id=1281706 Signed-off-by: Jiri Denemark --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4bd4071787..9fd4c570cd 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2763,6 +2763,12 @@ qemuDomainGetControlInfo(virDomainPtr dom, if (virDomainGetControlInfoEnsureACL(dom->conn, vm->def) < 0) goto cleanup; + if (!virDomainObjIsActive(vm)) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("domain is not running")); + goto cleanup; + } + priv = vm->privateData; memset(info, 0, sizeof(*info));