Commit c2c37f8c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Fix a leak when trying to add to readonly collection (Valgrind).

parent 2a8d4a03
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment