mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-13 11:15:08 +00:00
ch_driver: End job properly on failed chDomainCreateXML()
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@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
parent
b928e0d80c
commit
3d13f6abcd
@ -228,10 +228,11 @@ chDomainCreateXML(virConnectPtr conn,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virCHProcessStart(driver, vm, VIR_DOMAIN_RUNNING_BOOTED) < 0)
|
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);
|
dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id);
|
||||||
|
|
||||||
|
endjob:
|
||||||
virCHDomainObjEndJob(vm);
|
virCHDomainObjEndJob(vm);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
Reference in New Issue
Block a user