mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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:
parent
4d01763e3f
commit
e668d4a57d
@ -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;
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ int hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
|
||||
hypervObject **list);
|
||||
|
||||
void hypervFreeObject(hypervObject *object);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(hypervObject, hypervFreeObject);
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user