mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +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;
|
||||
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user