Nikolay Sivov : msxml3: Fix a string leak in msxml6 mode (Valgrind).

Alexandre Julliard julliard at winehq.org
Mon May 5 15:03:26 CDT 2014


Module: wine
Branch: master
Commit: c7f1262613c83cef476dafe9bb7e912148b9c6f4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c7f1262613c83cef476dafe9bb7e912148b9c6f4

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun May  4 20:33:51 2014 +0400

msxml3: Fix a string leak in msxml6 mode (Valgrind).

---

 dlls/msxml3/schema.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c
index a4aa083..d694cb3 100644
--- a/dlls/msxml3/schema.c
+++ b/dlls/msxml3/schema.c
@@ -1318,11 +1318,13 @@ static HRESULT WINAPI schema_cache_get(IXMLDOMSchemaCollection2* iface, BSTR uri
 static HRESULT WINAPI schema_cache_remove(IXMLDOMSchemaCollection2* iface, BSTR uri)
 {
     schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface);
-    xmlChar* name = uri ? xmlchar_from_wchar(uri) : xmlchar_from_wchar(emptyW);
+    xmlChar* name;
+
     TRACE("(%p)->(%s)\n", This, debugstr_w(uri));
 
     if (This->version == MSXML6) return E_NOTIMPL;
 
+    name = uri ? xmlchar_from_wchar(uri) : xmlchar_from_wchar(emptyW);
     cache_remove_entry(This, name);
     heap_free(name);
     return S_OK;




More information about the wine-cvs mailing list