From: Lin Ma Date: Fri, 4 May 2018 09:28:48 +0000 (+0800) Subject: virsh: Error out while domain not found for 'qemu-monitor-event' command X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b925e6625c9ed7c7df4dede3ac9ee410567025a5;p=libvirt.git virsh: Error out while domain not found for 'qemu-monitor-event' command Signed-off-by: Lin Ma --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 2b775fc4cc..3b2a34f936 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -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;