Commit 8bd2d539 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

oleaut32: Fix memory leaks in LPSAFEARRAY and VT_CARRAY marshalling.

parent b5139f45
......@@ -894,6 +894,8 @@ serialize_param(
if (debugout && (i<arrsize-1)) TRACE_(olerelay)(",");
}
if (debugout) TRACE_(olerelay)("]");
if (dealloc)
HeapFree(GetProcessHeap(), 0, *(void **)arg);
return S_OK;
}
case VT_SAFEARRAY: {
......@@ -905,6 +907,11 @@ serialize_param(
LPSAFEARRAY_UserMarshal(&flags, buf->base + buf->curoff, (LPSAFEARRAY *)arg);
buf->curoff = size;
}
if (dealloc)
{
ULONG flags = MAKELONG(MSHCTX_DIFFERENTMACHINE, NDR_LOCAL_DATA_REPRESENTATION);
LPSAFEARRAY_UserFree(&flags, (LPSAFEARRAY *)arg);
}
return S_OK;
}
default:
......
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