Author: cwittich Date: Fri Jan 18 13:05:52 2008 New Revision: 31848
URL: http://svn.reactos.org/svn/reactos?rev=31848&view=rev Log: Rob Shearman : rpcrt4: Set the fBufferValid flag in NdrProxyGetBuffer. <rob at codeweavers.com>
Modified: trunk/reactos/dll/win32/rpcrt4/cproxy.c
Modified: trunk/reactos/dll/win32/rpcrt4/cproxy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/cproxy.c?r... ============================================================================== --- trunk/reactos/dll/win32/rpcrt4/cproxy.c (original) +++ trunk/reactos/dll/win32/rpcrt4/cproxy.c Fri Jan 18 13:05:52 2008 @@ -364,6 +364,7 @@ RpcRaiseException(hr); return; } + pStubMsg->fBufferValid = TRUE; pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer; pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength; pStubMsg->Buffer = pStubMsg->BufferStart; @@ -408,11 +409,13 @@ void WINAPI NdrProxyFreeBuffer(void *This, PMIDL_STUB_MESSAGE pStubMsg) { - HRESULT hr; - TRACE("(%p,%p)\n", This, pStubMsg); - hr = IRpcChannelBuffer_FreeBuffer(pStubMsg->pRpcChannelBuffer, - (RPCOLEMESSAGE*)pStubMsg->RpcMsg); + if (pStubMsg->fBufferValid) + { + IRpcChannelBuffer_FreeBuffer(pStubMsg->pRpcChannelBuffer, + (RPCOLEMESSAGE*)pStubMsg->RpcMsg); + pStubMsg->fBufferValid = TRUE; + } }
/***********************************************************************