Use g_auto for xmlFreeDoc everywhere

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Ján Tomko
2021-08-11 13:57:18 +02:00
parent 5dae71ee8c
commit 2c426d2e30
28 changed files with 36 additions and 74 deletions

View File

@@ -42,7 +42,7 @@ struct testSetStruct {
#define PARSE(xml, var) \
do { \
int rc; \
xmlDocPtr doc; \
g_autoptr(xmlDoc) doc = NULL; \
g_autoptr(xmlXPathContext) ctxt = NULL; \
\
if (!xml) \
@@ -57,7 +57,6 @@ struct testSetStruct {
NULL, \
ctxt->node, \
true); \
xmlFreeDoc(doc); \
if (rc < 0) \
goto cleanup; \
} while (0)