Module: wine Branch: master Commit: caa9f89a18a43bf1183891e59757967aba7cfbc4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=caa9f89a18a43bf1183891e597...
Author: Rob Shearman rob@codeweavers.com Date: Mon Jan 7 17:15:08 2008 +0000
ole32: Fix a memory leak.
---
dlls/ole32/oleproxy.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c index bc87997..d37c2cf 100644 --- a/dlls/ole32/oleproxy.c +++ b/dlls/ole32/oleproxy.c @@ -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; }