Module: wine Branch: master Commit: ddf59f50f77448f7ba2d240e93eb3e8ed535c1ea URL: http://source.winehq.org/git/wine.git/?a=commit;h=ddf59f50f77448f7ba2d240e93...
Author: Rob Shearman rob@codeweavers.com Date: Mon Nov 26 22:50:48 2007 +0000
ole32: Clean up properly in ClientRpcChannelBuffer_SendReceive in the case where PostMessageW fails.
---
dlls/ole32/rpc.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index d4e6bfd..40330d4 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -796,6 +796,14 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac (LPARAM)&message_state->params)) { ERR("PostMessage failed with error %u\n", GetLastError()); + + IRpcStubBuffer_Release(message_state->params.stub); + message_state->params.stub = NULL; + IRpcChannelBuffer_Release(message_state->params.chan); + message_state->params.chan = NULL; + /* Note: message_state->params.iface doesn't have a reference and + * so doesn't need to be released */ + hr = HRESULT_FROM_WIN32(GetLastError()); } }