From: Lin Ma Date: Fri, 4 May 2018 09:28:49 +0000 (+0800) Subject: virsh: Error out while domain not found for 'event' command X-Git-Tag: v4.4.0-rc1~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2273e408d905af28f40c71ecba9a9b700d09bcd3;p=thirdparty%2Flibvirt.git virsh: Error out while domain not found for 'event' command Signed-off-by: Lin Ma --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 3b2a34f936..1f3ea0c939 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -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;