]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
libxl: don't end job for ephemeal domain on start failure
authorIan Campbell <ian.campbell@citrix.com>
Thu, 10 Sep 2015 15:45:07 +0000 (16:45 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 11 Sep 2015 08:56:43 +0000 (10:56 +0200)
commit 4b53d0d4ac9c "libxl: don't remove persistent domain on start
failure" cleans up the vm object and sets it to NULL if the vm is not
persistent, however at end job vm (now NULL) is dereferenced via the call to
libxlDomainObjEndJob. Avoid this by skipping "endjob" and going
straight to "cleanup" in this case.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
src/libxl/libxl_driver.c

index 5f69b49b7e272586af286dcc50df42a679d6dca2..e2797d5275027ddc9385cb82300360fe0e2ae266 100644 (file)
@@ -992,6 +992,7 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
         if (!vm->persistent) {
             virDomainObjListRemove(driver->domains, vm);
             vm = NULL;
+            goto cleanup;
         }
         goto endjob;
     }