[PATCH] wsdapi: Fix use-after-free when checking for unique prefix (Valgrind)
Nikolay Sivov
nsivov at codeweavers.com
Sat Aug 26 14:12:59 CDT 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
For https://bugs.winehq.org/show_bug.cgi?id=43389
dlls/wsdapi/xml.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/wsdapi/xml.c b/dlls/wsdapi/xml.c
index 145c394f85..824b7ff2fd 100644
--- a/dlls/wsdapi/xml.c
+++ b/dlls/wsdapi/xml.c
@@ -529,6 +529,7 @@ static HRESULT WINAPI IWSDXMLContextImpl_AddNamespace(IWSDXMLContext *iface, LPC
if (setNewPrefix)
{
WSDFreeLinkedMemory((void *)ns->PreferredPrefix);
+ ns->PreferredPrefix = NULL;
if ((newPrefix != NULL) && (is_prefix_unique(This->namespaces, newPrefix)))
{
--
2.14.1
More information about the wine-patches
mailing list