ole32: Return the buffer pointer when WdtpInterfacePointer_UserMarshal fails.
Found by PVS-Studio.
This commit is contained in:
parent
139ebf643a
commit
514951cc11
|
@ -576,6 +576,7 @@ static void marshal_WdtpInterfacePointer(DWORD umcb_ctx, DWORD ctx)
|
|||
ok(size == 0, "size should be 0 bytes, not %d\n", size);
|
||||
buffer = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, ctx, buffer, unk, &IID_IUnknown);
|
||||
ok(buffer_end == buffer, "buffer_end %p buffer %p\n", buffer_end, buffer);
|
||||
HeapFree(GetProcessHeap(), 0, buffer);
|
||||
|
||||
/* Now for a non-NULL pointer. The marshalled data are two size DWORDS and then
|
||||
|
|
|
@ -1641,7 +1641,7 @@ unsigned char * WINAPI WdtpInterfacePointer_UserMarshal(ULONG *pFlags, ULONG Rea
|
|||
if(CoMarshalInterface(stm, riid, punk, LOWORD(RealFlags), NULL, MSHLFLAGS_NORMAL) != S_OK)
|
||||
{
|
||||
IStream_Release(stm);
|
||||
return NULL;
|
||||
return pBuffer;
|
||||
}
|
||||
|
||||
ALIGN_POINTER(pBuffer, 3);
|
||||
|
|
Loading…
Reference in New Issue