]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Don't jump to endjob if no job was even started
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 31 Jan 2012 15:59:02 +0000 (16:59 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 1 Feb 2012 07:42:47 +0000 (08:42 +0100)
In qemuDomainShutdownFlags if we try to use guest agent,
which has error or is not configured, we jump go endjob
label even if we haven't started any job yet. This may
lead to the daemon crash:
1) virsh shutdown --mode agent on a domain without agent configured
2) wait until domain quits
3) virsh edit

src/qemu/qemu_driver.c

index 1b147a9a3560cb1391a87bf5573a9a1020a4b3cc..7945c5dbd9b77c97e7029f59e7aaefab6bc2d756 100644 (file)
@@ -1546,12 +1546,12 @@ static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned int flags) {
         if (priv->agentError) {
             qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                             _("QEMU guest agent is not available due to an error"));
-            goto endjob;
+            goto cleanup;
         }
         if (!priv->agent) {
             qemuReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
                             _("QEMU guest agent is not configured"));
-            goto endjob;
+            goto cleanup;
         }
     }