From: Steve Sold <infirms@protonmail.com> --- dlls/kernelbase/thread.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c index 13040915817..d5c84a3eb7f 100644 --- a/dlls/kernelbase/thread.c +++ b/dlls/kernelbase/thread.c @@ -152,8 +152,13 @@ HANDLE WINAPI DECLSPEC_HOTPATCH CreateRemoteThreadEx( HANDLE process, SECURITY_A if (actctx) { - ULONG_PTR cookie; - RtlActivateActivationContextEx( 0, teb, actctx, &cookie ); + ULONG_PTR cookie = 0; + if (!set_ntstatus( RtlActivateActivationContextEx( 0, teb, actctx, &cookie ))) + { + RtlReleaseActivationContext( actctx ); + return 0; + } + RtlReleaseActivationContext( actctx ); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10355