ole32: Fix a memory leak.

This commit is contained in:
Rob Shearman 2008-01-07 17:15:08 +00:00 committed by Alexandre Julliard
parent b6553e7e29
commit caa9f89a18
1 changed files with 5 additions and 3 deletions

View File

@ -574,9 +574,11 @@ static HRESULT WINAPI RemUnkStub_Invoke(LPRPCSTUBBUFFER iface,
*(HRESULT *)buf = hr;
buf += sizeof(HRESULT);
if (hr) return hr;
/* FIXME: pQIResults is a unique pointer so pQIResults can be NULL! */
memcpy(buf, pQIResults, cIids * sizeof(REMQIRESULT));
if (hr == S_OK)
/* FIXME: pQIResults is a unique pointer so pQIResults can be NULL! */
memcpy(buf, pQIResults, cIids * sizeof(REMQIRESULT));
CoTaskMemFree(pQIResults);
break;
}