diff --git a/libvirt.spec.in b/libvirt.spec.in index 29f34f673a..80563ce6ef 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -363,7 +363,7 @@ BuildRequires: netcf-devel >= 0.2.2 BuildRequires: libcurl-devel %endif %if %{with_hyperv} -BuildRequires: libwsman-devel >= 2.2.3 +BuildRequires: libwsman-devel >= 2.6.3 %endif BuildRequires: audit-libs-devel # we need /usr/sbin/dtrace diff --git a/meson.build b/meson.build index a5ce8e17a8..d0e977f7bd 100644 --- a/meson.build +++ b/meson.build @@ -1207,7 +1207,7 @@ if numactl_dep.found() conf.set('WITH_NUMACTL', 1) endif -openwsman_version = '2.2.3' +openwsman_version = '2.6.3' openwsman_dep = dependency('openwsman', version: '>=' + openwsman_version, required: get_option('openwsman')) parallels_sdk_version = '7.0.22' diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index dcde469442..7db6802a55 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -383,10 +383,8 @@ hypervFreePrivate(hypervPrivate **priv) if (priv == NULL || *priv == NULL) return; - if ((*priv)->client != NULL) { - /* FIXME: This leaks memory due to bugs in openwsman <= 2.2.6 */ + if ((*priv)->client != NULL) wsmc_release((*priv)->client); - } if ((*priv)->caps) virObjectUnref((*priv)->caps); diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index b233dab58d..6d0445184a 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -1082,8 +1082,6 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery, if (data != NULL) { #if WS_SERIALIZER_FREE_MEM_WORKS - /* FIXME: ws_serializer_free_mem is broken in openwsman <= 2.2.6, - * see hypervFreeObject for a detailed explanation. */ if (ws_serializer_free_mem(serializerContext, data, wmiInfo->serializerInfo) < 0) { VIR_ERROR(_("Could not free deserialized data")); @@ -1118,12 +1116,6 @@ hypervFreeObject(hypervPrivate *priv G_GNUC_UNUSED, hypervObject *object) next = object->next; #if WS_SERIALIZER_FREE_MEM_WORKS - /* FIXME: ws_serializer_free_mem is broken in openwsman <= 2.2.6, - * but this is not that critical, because openwsman keeps - * track of all allocations of the deserializer and frees - * them in wsmc_release. So this doesn't result in a real - * memory leak, but just in piling up unused memory until - * the connection is closed. */ if (ws_serializer_free_mem(serializerContext, object->data.common, object->info->serializerInfo) < 0) { VIR_ERROR(_("Could not free deserialized data")); diff --git a/src/hyperv/openwsman.h b/src/hyperv/openwsman.h index cd7660ac2e..c59c450ea6 100644 --- a/src/hyperv/openwsman.h +++ b/src/hyperv/openwsman.h @@ -21,27 +21,10 @@ #pragma once -/* Workaround openwsman <= 2.2.6 unconditionally defining optarg. Just pretend - * that u/os.h was already included. Need to explicitly include time.h because - * wsman-xml-serializer.h needs it and u/os.h would have included it. */ -#include -#define _LIBU_OS_H_ #include -/* wsman-xml-serializer.h in openwsman <= 2.2.6 is missing this defines */ -#ifndef SER_NS_INT8 -# define SER_NS_INT8(ns, n, x) SER_NS_INT8_FLAGS(ns, n, x, 0) -#endif -#ifndef SER_NS_INT16 -# define SER_NS_INT16(ns, n, x) SER_NS_INT16_FLAGS(ns, n, x, 0) -#endif -#ifndef SER_NS_INT32 -# define SER_NS_INT32(ns, n, x) SER_NS_INT32_FLAGS(ns, n, x, 0) -#endif -#ifndef SER_NS_INT64 -# define SER_NS_INT64(ns, n, x) SER_NS_INT64_FLAGS(ns, n, x, 0) -#endif - /* wsman-xml.h */ WsXmlDocH ws_xml_create_doc(const char *rootNsUri, const char *rootName); + +/* wsman-xml-binding.h */ WsXmlNodeH xml_parser_get_root(WsXmlDocH doc);