]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Error out while domain not found for 'qemu-monitor-event' command
authorLin Ma <lma@suse.com>
Fri, 4 May 2018 09:28:48 +0000 (17:28 +0800)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 4 May 2018 10:46:22 +0000 (12:46 +0200)
Signed-off-by: Lin Ma <lma@suse.com>
tools/virsh-domain.c

index 2b775fc4cca6ef4696e25b3025fd6b80fb3381f5..3b2a34f936edfbfb4672571800d16c5fad6f10a6 100644 (file)
@@ -9661,7 +9661,9 @@ cmdQemuMonitorEvent(vshControl *ctl, const vshCmd *cmd)
         return false;
 
     if (vshCommandOptBool(cmd, "domain"))
-        dom = virshCommandOptDomain(ctl, cmd, NULL);
+        if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
+            goto cleanup;
+
     if (vshEventStart(ctl, timeout) < 0)
         goto cleanup;