When creating a domain failed, then the virCHDomainObjEndJob() would be jumped over. Fix this by creating enjob label and fixing one goto. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/ch/ch_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index b023f7e3d3..cd156a222b 100644 --- a/src/ch/ch_driver.c +++ b/src/ch/ch_driver.c @@ -228,10 +228,11 @@ chDomainCreateXML(virConnectPtr conn, goto cleanup; if (virCHProcessStart(driver, vm, VIR_DOMAIN_RUNNING_BOOTED) < 0) - goto cleanup; + goto endjob; dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id); + endjob: virCHDomainObjEndJob(vm); cleanup: -- 2.34.1