The virBhyveProcessStartImpl() function which implements domain start
does not check if bhyve monitor open is successful. Check that and
jump to the cleanup routines if it was not.
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
vm->def->id = vm->pid;
virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, reason);
- priv->mon = bhyveMonitorOpen(vm, driver);
+ if ((priv->mon = bhyveMonitorOpen(vm, driver)) == NULL)
+ goto cleanup;
if (virBhyveDomainObjStartWorker(vm) < 0)
goto cleanup;