From: Ian Campbell Date: Thu, 10 Sep 2015 15:45:07 +0000 (+0100) Subject: libxl: don't end job for ephemeal domain on start failure X-Git-Tag: v1.2.18.1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b84e9ef24b7369653d3bf3ed17ef8522ff678a49;p=thirdparty%2Flibvirt.git libxl: don't end job for ephemeal domain on start failure 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 (cherry picked from commit ee7758f09bad855f5d0fdf9804d8979cdbbff40e) --- diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 5f69b49b7e..e2797d5275 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -992,6 +992,7 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml, if (!vm->persistent) { virDomainObjListRemove(driver->domains, vm); vm = NULL; + goto cleanup; } goto endjob; }