From c2c37f8c406cbecca5e9f0a3a61b6d350c3f7ac5 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 25 Apr 2014 16:49:27 +0400 Subject: [PATCH] msxml3: Fix a leak when trying to add to readonly collection (Valgrind). --- dlls/msxml3/schema.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index 2b2882ce7da..8776de8c505 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -1193,11 +1193,14 @@ static HRESULT WINAPI schema_cache_Invoke(IXMLDOMSchemaCollection2* iface, static HRESULT WINAPI schema_cache_add(IXMLDOMSchemaCollection2* iface, BSTR uri, VARIANT var) { schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface); - xmlChar* name = uri ? xmlchar_from_wchar(uri) : xmlchar_from_wchar(emptyW); + xmlChar* name; + TRACE("(%p)->(%s %s)\n", This, debugstr_w(uri), debugstr_variant(&var)); if (This->read_only) return E_FAIL; + name = uri ? xmlchar_from_wchar(uri) : xmlchar_from_wchar(emptyW); + switch (V_VT(&var)) { case VT_NULL: -- 2.11.4.GIT