mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
libxl: Fix cleanup on domain start error
If building the libxl domain config fails, cleanup before returning failure.
This commit is contained in:
@@ -769,7 +769,7 @@ libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
|
||||
libxl_domain_config_init(&d_config);
|
||||
|
||||
if (libxlBuildDomainConfig(driver, vm->def, &d_config) < 0)
|
||||
return -1;
|
||||
goto error;
|
||||
|
||||
if (libxlFreeMem(priv, &d_config) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user