libxl: don't end job for ephemeal domain on start failure

commit 4b53d0d4ac "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>
This commit is contained in:
Ian Campbell authored and Michal Privoznik committed 2015-09-11 10:56:43 +02:00
1 parent 80dca1eba9
commit ee7758f09b
1 file changed
+1
+1
View File
@@ -992,6 +992,7 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
if (!vm->persistent) {
virDomainObjListRemove(driver->domains, vm);
vm = NULL;
goto cleanup;
}
goto endjob;
}