Module: wine Branch: master Commit: f810a57590fa84f6684300516e1d160cb3109082 URL: https://gitlab.winehq.org/wine/wine/-/commit/f810a57590fa84f6684300516e1d160...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri Nov 18 18:37:44 2022 +0100
rpcss: Use I_Rpc(Free|Allocate) in MIDL_user_(allocate|free).
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); }