From c1eda064783665b73eb77b36136765aa5c7a35ea Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Tue, 15 Jan 2013 15:56:35 -0700 Subject: [PATCH] libxl: Fix cleanup on domain start error If building the libxl domain config fails, cleanup before returning failure. --- src/libxl/libxl_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 7c5f3b88ab..a8c4cae0e5 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -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, -- GitLab