From: Rémi Bernon rbernon@codeweavers.com
In ept_map, rpcss uses TowerConstruct to allocate tower array elements.
The array is later released by the generated stub code, and each element is ultimately freed using MIDL_user_free.
TowerConstruct always allocate memory using I_RpcAllocate, we must use I_RpcFree to free it. --- programs/rpcss/irotp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/rpcss/irotp.c b/programs/rpcss/irotp.c index daf48daf0a7..357a7f84cd9 100644 --- a/programs/rpcss/irotp.c +++ b/programs/rpcss/irotp.c @@ -368,10 +368,10 @@ void __RPC_USER IrotContextHandle_rundown(IrotContextHandle ctxt_handle)
void * __RPC_USER MIDL_user_allocate(SIZE_T size) { - return malloc(size); + return I_RpcAllocate(size); }
void __RPC_USER MIDL_user_free(void * p) { - free(p); + I_RpcFree(p); }