wsdapi: Fix use-after-free when checking for unique prefix (Valgrind).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-08-26 22:12:59 +03:00 committed by Alexandre Julliard
parent cd4139df3c
commit 3cb938fd4f
1 changed files with 1 additions and 0 deletions

View File

@ -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)))
{