Re: [PATCH 5/5] libxl: Fix cleanup on domain start error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013年01月16日 07:15, Jim Fehlig wrote:
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 baa05e8..6da0272 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,

            vm->hasManagedSave = false;
        }
        VIR_FREE(managed_save_path);

This can be removed. It's freed in "error". But I'm fine if you keep it
there when pushing. ACK

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]