Commit 514951cc authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ole32: Return the buffer pointer when WdtpInterfacePointer_UserMarshal fails.

Found by PVS-Studio.
parent 139ebf64
......@@ -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);
......
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