]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Error out while domain not found for 'event' command
authorLin Ma <lma@suse.com>
Fri, 4 May 2018 09:28:49 +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 3b2a34f936edfbfb4672571800d16c5fad6f10a6..1f3ea0c939946335bc5cbbff29e077a0b08739b8 100644 (file)
@@ -13445,7 +13445,9 @@ cmdEvent(vshControl *ctl, const vshCmd *cmd)
         goto cleanup;
 
     if (vshCommandOptBool(cmd, "domain"))
-        dom = virshCommandOptDomain(ctl, cmd, NULL);
+        if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
+            goto cleanup;
+
     if (vshEventStart(ctl, timeout) < 0)
         goto cleanup;