Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/libxl/libxl_domain.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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;
}
--
2.26.2