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

msxml3: Fix a leak of error message BSTR.

parent ecfc3f15
...@@ -218,6 +218,7 @@ static void format_error_message_from_id(saxlocator *This, HRESULT hr) ...@@ -218,6 +218,7 @@ static void format_error_message_from_id(saxlocator *This, HRESULT hr)
BSTR bstrMsg = SysAllocString(msg); BSTR bstrMsg = SysAllocString(msg);
IVBSAXErrorHandler_fatalError(This->saxreader->vberrorHandler, IVBSAXErrorHandler_fatalError(This->saxreader->vberrorHandler,
(IVBSAXLocator*)&This->lpVBSAXLocatorVtbl, &bstrMsg, hr); (IVBSAXLocator*)&This->lpVBSAXLocatorVtbl, &bstrMsg, hr);
SysFreeString(bstrMsg);
} }
else else
ISAXErrorHandler_fatalError(This->saxreader->errorHandler, ISAXErrorHandler_fatalError(This->saxreader->errorHandler,
...@@ -1319,6 +1320,7 @@ static void libxmlFatalError(void *ctx, const char *msg, ...) ...@@ -1319,6 +1320,7 @@ static void libxmlFatalError(void *ctx, const char *msg, ...)
BSTR bstrError = SysAllocString(wszError); BSTR bstrError = SysAllocString(wszError);
IVBSAXErrorHandler_fatalError(This->saxreader->vberrorHandler, IVBSAXErrorHandler_fatalError(This->saxreader->vberrorHandler,
(IVBSAXLocator*)&This->lpVBSAXLocatorVtbl, &bstrError, E_FAIL); (IVBSAXLocator*)&This->lpVBSAXLocatorVtbl, &bstrError, E_FAIL);
SysFreeString(bstrError);
} }
else else
ISAXErrorHandler_fatalError(This->saxreader->errorHandler, ISAXErrorHandler_fatalError(This->saxreader->errorHandler,
......
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