RpcRaiseException(hr);
return;
}
+ pStubMsg->fBufferValid = TRUE;
pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
pStubMsg->Buffer = pStubMsg->BufferStart;
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;
+ }
}
/***********************************************************************