tests: use g_auto instead of virDomainFree

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
Ján Tomko committed 2021-09-09 18:06:13 +02:00
1 parent 9e1893ebd0
commit 6150910cf7
11 files changed
+13 -26

No files matched your search

+1 -2
View File
@@ -1009,7 +1009,7 @@ testCompareDomXML2XMLFiles(virCaps *caps G_GNUC_UNUSED,
g_autofree char *actual = NULL;
int ret = -1;
testCompareDomXML2XMLResult result;
virDomainDef *def = NULL;
g_autoptr(virDomainDef) def = NULL;
unsigned int parse_flags = live ? 0 : VIR_DOMAIN_DEF_PARSE_INACTIVE;
unsigned int format_flags = VIR_DOMAIN_DEF_FORMAT_SECURE;
@@ -1059,7 +1059,6 @@ testCompareDomXML2XMLFiles(virCaps *caps G_GNUC_UNUSED,
expectResult, result);
}
virDomainDefFree(def);
return ret;
}