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

msxml3: Improve error handling (Coverity).

parent 97fee99c
...@@ -570,9 +570,8 @@ static HRESULT WINAPI xslprocessor_transform( ...@@ -570,9 +570,8 @@ static HRESULT WINAPI xslprocessor_transform(
TRACE("(%p)->(%p)\n", This, ret); TRACE("(%p)->(%p)\n", This, ret);
if (!ret) return E_INVALIDARG; if (!ret)
return E_INVALIDARG;
SysFreeString(This->outstr);
if (This->output_type == PROCESSOR_OUTPUT_STREAM) if (This->output_type == PROCESSOR_OUTPUT_STREAM)
{ {
...@@ -582,9 +581,12 @@ static HRESULT WINAPI xslprocessor_transform( ...@@ -582,9 +581,12 @@ static HRESULT WINAPI xslprocessor_transform(
else if (This->output_type == PROCESSOR_OUTPUT_PERSISTSTREAM || else if (This->output_type == PROCESSOR_OUTPUT_PERSISTSTREAM ||
This->output_type == PROCESSOR_OUTPUT_RESPONSE) This->output_type == PROCESSOR_OUTPUT_RESPONSE)
{ {
CreateStreamOnHGlobal(NULL, TRUE, (IStream **)&stream); if (FAILED(hr = CreateStreamOnHGlobal(NULL, TRUE, (IStream **)&stream)))
return hr;
} }
SysFreeString(This->outstr);
hr = node_transform_node_params(get_node_obj(This->input), This->stylesheet->node, hr = node_transform_node_params(get_node_obj(This->input), This->stylesheet->node,
&This->outstr, stream, &This->params); &This->outstr, stream, &This->params);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
...@@ -612,7 +614,8 @@ static HRESULT WINAPI xslprocessor_transform( ...@@ -612,7 +614,8 @@ static HRESULT WINAPI xslprocessor_transform(
DWORD size; DWORD size;
void *dest; void *dest;
GetHGlobalFromStream(src, &hglobal); if (FAILED(hr = GetHGlobalFromStream(src, &hglobal)))
break;
size = GlobalSize(hglobal); size = GlobalSize(hglobal);
bound.lLbound = 0; bound.lLbound = 0;
......
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