mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
hyperv_wmi: remove unreachable cleanup code
In the cleanup section @data will always be NULL. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
b96174d9f2
commit
2b58ce9155
@ -942,7 +942,6 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
|
|||||||
hypervObject *head = NULL;
|
hypervObject *head = NULL;
|
||||||
hypervObject *tail = NULL;
|
hypervObject *tail = NULL;
|
||||||
WsXmlNodeH node = NULL;
|
WsXmlNodeH node = NULL;
|
||||||
XML_TYPE_PTR data = NULL;
|
|
||||||
hypervObject *object;
|
hypervObject *object;
|
||||||
|
|
||||||
query_string = virBufferContentAndReset(wqlQuery->query);
|
query_string = virBufferContentAndReset(wqlQuery->query);
|
||||||
@ -983,6 +982,8 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
|
|||||||
response = NULL;
|
response = NULL;
|
||||||
|
|
||||||
while (enumContext != NULL && *enumContext != '\0') {
|
while (enumContext != NULL && *enumContext != '\0') {
|
||||||
|
XML_TYPE_PTR data = NULL;
|
||||||
|
|
||||||
response = wsmc_action_pull(priv->client, wmiInfo->resourceUri, options,
|
response = wsmc_action_pull(priv->client, wmiInfo->resourceUri, options,
|
||||||
filter, enumContext);
|
filter, enumContext);
|
||||||
|
|
||||||
@ -1030,8 +1031,6 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
|
|||||||
object->info = wmiInfo;
|
object->info = wmiInfo;
|
||||||
object->data = data;
|
object->data = data;
|
||||||
|
|
||||||
data = NULL;
|
|
||||||
|
|
||||||
if (head == NULL) {
|
if (head == NULL) {
|
||||||
head = object;
|
head = object;
|
||||||
} else {
|
} else {
|
||||||
@ -1059,13 +1058,6 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
|
|||||||
if (filter != NULL)
|
if (filter != NULL)
|
||||||
filter_destroy(filter);
|
filter_destroy(filter);
|
||||||
|
|
||||||
if (data != NULL) {
|
|
||||||
if (ws_serializer_free_mem(serializerContext, data,
|
|
||||||
wmiInfo->serializerInfo) < 0) {
|
|
||||||
VIR_ERROR(_("Could not free deserialized data"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VIR_FREE(query_string);
|
VIR_FREE(query_string);
|
||||||
ws_xml_destroy_doc(response);
|
ws_xml_destroy_doc(response);
|
||||||
VIR_FREE(enumContext);
|
VIR_FREE(enumContext);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user