mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
libxl: Fix cleanup on domain start error
If building the libxl domain config fails, cleanup before returning failure.
This commit is contained in:
parent
52947fe3ae
commit
c1eda06478
@ -769,7 +769,7 @@ libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
|
|||||||
libxl_domain_config_init(&d_config);
|
libxl_domain_config_init(&d_config);
|
||||||
|
|
||||||
if (libxlBuildDomainConfig(driver, vm->def, &d_config) < 0)
|
if (libxlBuildDomainConfig(driver, vm->def, &d_config) < 0)
|
||||||
return -1;
|
goto error;
|
||||||
|
|
||||||
if (libxlFreeMem(priv, &d_config) < 0) {
|
if (libxlFreeMem(priv, &d_config) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
Loading…
Reference in New Issue
Block a user