rpcrt4: Initialize allocated pointers to NULL in PointerUnmarshall.

This patch initializes allocated pointers in PointerUnmarshall since later
code checks the value for NULL (specifically, NdrConformantArrayUnmarshall).
This commit is contained in:
Dan Hipschman 2007-11-02 15:22:47 -07:00 committed by Alexandre Julliard
parent eaffc0a0da
commit 8caa325eb7
1 changed files with 3 additions and 1 deletions

View File

@ -976,8 +976,10 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
if (pointer_needs_unmarshaling) {
if (attr & RPC_FC_P_DEREF) {
if (!*pPointer || fMustAlloc)
if (!*pPointer || fMustAlloc) {
*pPointer = NdrAllocate(pStubMsg, sizeof(void *));
*(unsigned char**) *pPointer = NULL;
}
pPointer = *(unsigned char***)pPointer;
TRACE("deref => %p\n", pPointer);
}