hyperv: enable use of g_autoptr for hypervObject

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
Matt Coleman 2021-01-21 13:50:45 -05:00 committed by Laine Stump
parent 4d01763e3f
commit e668d4a57d
2 changed files with 2 additions and 2 deletions

View File

@ -939,7 +939,7 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
filter_t *filter = NULL;
WsXmlDocH response = NULL;
char *enumContext = NULL;
hypervObject *head = NULL;
g_autoptr(hypervObject) head = NULL;
hypervObject *tail = NULL;
WsXmlNodeH node = NULL;
hypervObject *object;
@ -1062,7 +1062,6 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
VIR_FREE(query_string);
ws_xml_destroy_doc(response);
VIR_FREE(enumContext);
hypervFreeObject(head);
return result;
}

View File

@ -64,6 +64,7 @@ int hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
hypervObject **list);
void hypervFreeObject(hypervObject *object);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(hypervObject, hypervFreeObject);
/*