oleaut32: Fix memory leaks in LPSAFEARRAY and VT_CARRAY marshalling.
This commit is contained in:
parent
b5139f45b3
commit
8bd2d5395d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue