Commit 86893ce2 authored by Jinoh Kang's avatar Jinoh Kang Committed by Alexandre Julliard

ntdll: Fail loudly if RtlActivateActivationContextEx fails to allocate memory.

Many built-in callers of ActivateActCtx() just assume that it will always succeed. If it ever fails, then DeactivateActCtx() will notice that the cookie is invalid and raise an exception anyway.
parent e77a9eda
......@@ -5423,9 +5423,7 @@ NTSTATUS WINAPI RtlActivateActivationContextEx( ULONG flags, TEB *teb, HANDLE ha
ACTIVATION_CONTEXT_STACK *actctx_stack = teb->ActivationContextStackPointer;
RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame;
if (!(frame = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*frame) )))
return STATUS_NO_MEMORY;
frame = RtlAllocateHeap( GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, sizeof(*frame) );
frame->Previous = actctx_stack->ActiveFrame;
frame->ActivationContext = handle;
frame->Flags = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment