Author: cwittich
Date: Fri Jan 18 13:42:16 2008
New Revision: 31853
URL:
http://svn.reactos.org/svn/reactos?rev=31853&view=rev
Log:
rpcrt4: Don't set Buffer to NULL in I_RpcFreeBuffer. <rob at codeweavers.com>
Modified:
trunk/reactos/dll/win32/rpcrt4/rpc_message.c
Modified: trunk/reactos/dll/win32/rpcrt4/rpc_message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_messa…
==============================================================================
--- trunk/reactos/dll/win32/rpcrt4/rpc_message.c (original)
+++ trunk/reactos/dll/win32/rpcrt4/rpc_message.c Fri Jan 18 13:42:16 2008
@@ -917,12 +917,10 @@
RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
{
TRACE("(%p): BufferLength=%d\n", pMsg, pMsg->BufferLength);
- /* FIXME: pfnAllocate? */
pMsg->Buffer = HeapAlloc(GetProcessHeap(), 0, pMsg->BufferLength);
TRACE("Buffer=%p\n", pMsg->Buffer);
- /* FIXME: which errors to return? */
- return pMsg->Buffer ? S_OK : E_OUTOFMEMORY;
+ return pMsg->Buffer ? RPC_S_OK : ERROR_OUTOFMEMORY;
}
/***********************************************************************
@@ -934,7 +932,7 @@
pMsg->Buffer = HeapReAlloc(GetProcessHeap(), 0, pMsg->Buffer,
pMsg->BufferLength);
TRACE("Buffer=%p\n", pMsg->Buffer);
- return pMsg->Buffer ? RPC_S_OK : RPC_S_OUT_OF_RESOURCES;
+ return pMsg->Buffer ? RPC_S_OK : ERROR_OUTOFMEMORY;
}
/***********************************************************************
@@ -955,10 +953,8 @@
RPC_STATUS WINAPI I_RpcFreeBuffer(PRPC_MESSAGE pMsg)
{
TRACE("(%p) Buffer=%p\n", pMsg, pMsg->Buffer);
- /* FIXME: pfnFree? */
HeapFree(GetProcessHeap(), 0, pMsg->Buffer);
- pMsg->Buffer = NULL;
- return S_OK;
+ return RPC_S_OK;
}
/***********************************************************************