Rob Shearman : ole32: Fix some memory leaks in the class factory
proxy.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Oct 27 05:49:20 CDT 2006
Module: wine
Branch: master
Commit: 93dfdf7a3f4c29308fbfebc85f58bcea51b2efb4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=93dfdf7a3f4c29308fbfebc85f58bcea51b2efb4
Author: Rob Shearman <rob at codeweavers.com>
Date: Thu Oct 26 12:38:27 2006 +0100
ole32: Fix some memory leaks in the class factory proxy.
---
dlls/ole32/oleproxy.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c
index 9a35b85..889e03c 100644
--- a/dlls/ole32/oleproxy.c
+++ b/dlls/ole32/oleproxy.c
@@ -382,11 +382,14 @@ static HRESULT WINAPI CFProxy_CreateInst
hres = IRpcChannelBuffer_SendReceive(This->chanbuf,&msg,&srstatus);
if (hres) {
FIXME("IRpcChannelBuffer_SendReceive failed with %x?\n",hres);
+ IRpcChannelBuffer_FreeBuffer(This->chanbuf,&msg);
return hres;
}
- if (!msg.cbBuffer) /* interface not found on remote */
+ if (!msg.cbBuffer) { /* interface not found on remote */
+ IRpcChannelBuffer_FreeBuffer(This->chanbuf,&msg);
return srstatus;
+ }
/* We got back: [Marshalled Interface data] */
TRACE("got %d bytes data.\n",msg.cbBuffer);
@@ -395,6 +398,7 @@ static HRESULT WINAPI CFProxy_CreateInst
hres = CreateStreamOnHGlobal(hGlobal,TRUE,&pStream);
if (hres) {
FIXME("CreateStreamOnHGlobal failed with %x\n",hres);
+ IRpcChannelBuffer_FreeBuffer(This->chanbuf,&msg);
return hres;
}
hres = CoUnmarshalInterface(
@@ -403,6 +407,9 @@ static HRESULT WINAPI CFProxy_CreateInst
ppv
);
IStream_Release(pStream); /* Does GlobalFree hGlobal too. */
+
+ IRpcChannelBuffer_FreeBuffer(This->chanbuf,&msg);
+
if (hres) {
FIXME("CoMarshalInterface failed, %x\n",hres);
return hres;
More information about the wine-cvs
mailing list