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

This commit is contained in:
Nikolay Sivov 2014-04-25 16:49:27 +04:00 committed by Alexandre Julliard
parent 2a8d4a03d3
commit c2c37f8c40
1 changed files with 4 additions and 1 deletions

View File

@ -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: