Commit 9ff15252 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Set the fBufferValid flag in NdrProxyGetBuffer.

Only call IRpcChannelBuffer_FreeBuffer in NdrProxyFreeBuffer if fBufferValid is set.
parent 974b4d2c
......@@ -364,6 +364,7 @@ void WINAPI NdrProxyGetBuffer(void *This,
RpcRaiseException(hr);
return;
}
pStubMsg->fBufferValid = TRUE;
pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
pStubMsg->Buffer = pStubMsg->BufferStart;
......@@ -408,11 +409,14 @@ void WINAPI NdrProxySendReceive(void *This,
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;
}
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment