From 486ab63862e758ced33dd31d5a9d010daa58a528 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 1 Feb 2025 14:10:37 +0200 Subject: [PATCH] [RPCRT4] Add SEH to avoid leaking locks / memory --- dll/win32/rpcrt4/ndr_contexthandle.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dll/win32/rpcrt4/ndr_contexthandle.c b/dll/win32/rpcrt4/ndr_contexthandle.c index 848d924e970..d0ce792fe86 100644 --- a/dll/win32/rpcrt4/ndr_contexthandle.c +++ b/dll/win32/rpcrt4/ndr_contexthandle.c @@ -59,8 +59,20 @@ static struct context_handle_entry *get_context_entry(NDR_CCONTEXT CContext) { struct context_handle_entry *che = CContext; +#ifdef __REACTOS__ + __TRY + { +#endif if (che->magic != NDR_CONTEXT_HANDLE_MAGIC) return NULL; +#ifdef __REACTOS__ + } + __EXCEPT_ALL + { + return NULL; + } + __ENDTRY +#endif return che; }