[PATCH 4/6] ch_driver: End job properly on failed chDomainCreateXML()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux