virsh: Error out while domain not found for 'event' command

Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
Lin Ma 2018-05-04 17:28:49 +08:00 committed by Peter Krempa
parent b925e6625c
commit 2273e408d9

View 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;