mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user