Re: [libvirt PATCH 1/8] libxl: libxlDomainStart: use g_autoptr for virDomainDef

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

 



On 10/4/20 4:21 PM, Ján Tomko wrote:
Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
  src/libxl/libxl_domain.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx>

Regards,
Jim


diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index a3f362a0c8..c96aeab04b 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -1261,7 +1261,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver,
                   uint32_t restore_ver LIBXL_DOMSTART_RESTORE_VER_ATTR)
  {
      libxl_domain_config d_config;
-    virDomainDefPtr def = NULL;
+    g_autoptr(virDomainDef) def = NULL;
      virObjectEventPtr event = NULL;
      libxlSavefileHeader hdr;
      int ret = -1;
@@ -1520,7 +1520,6 @@ libxlDomainStart(libxlDriverPrivatePtr driver,
      VIR_FREE(config_json);
      VIR_FREE(dom_xml);
      VIR_FREE(managed_save_path);
-    virDomainDefFree(def);
      VIR_FORCE_CLOSE(managed_save_fd);
      return ret;
  }






[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]

  Powered by Linux