ole32: Clean up properly in ClientRpcChannelBuffer_SendReceive in the case where PostMessageW fails.

This commit is contained in:
Rob Shearman 2007-11-26 22:50:48 +00:00 committed by Alexandre Julliard
parent 6262230a4b
commit ddf59f50f7
1 changed files with 8 additions and 0 deletions

View File

@ -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());
}
}