Commit caa9f89a authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Fix a memory leak.

parent b6553e7e
...@@ -574,10 +574,12 @@ static HRESULT WINAPI RemUnkStub_Invoke(LPRPCSTUBBUFFER iface, ...@@ -574,10 +574,12 @@ static HRESULT WINAPI RemUnkStub_Invoke(LPRPCSTUBBUFFER iface,
*(HRESULT *)buf = hr; *(HRESULT *)buf = hr;
buf += sizeof(HRESULT); buf += sizeof(HRESULT);
if (hr) return hr; if (hr == S_OK)
/* FIXME: pQIResults is a unique pointer so pQIResults can be NULL! */ /* FIXME: pQIResults is a unique pointer so pQIResults can be NULL! */
memcpy(buf, pQIResults, cIids * sizeof(REMQIRESULT)); memcpy(buf, pQIResults, cIids * sizeof(REMQIRESULT));
CoTaskMemFree(pQIResults);
break; break;
} }
case 4: /* RemAddRef */ case 4: /* RemAddRef */
......
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