Author: hbelusca
Date: Mon Jul 4 22:23:07 2016
New Revision: 71815
URL:
http://svn.reactos.org/svn/reactos?rev=71815&view=rev
Log:
[NTOS]: Exit gently in MmCreateTeb if the call to MiCreatePebOrTeb failed. This is OK
since the callers of MmCreateTeb check for its failure, and also perform cleanup &
exit in accordance.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Mon Jul 4 22:23:07 2016
@@ -757,7 +757,12 @@
// Allocate the TEB
//
Status = MiCreatePebOrTeb(Process, sizeof(TEB), (PULONG_PTR)&Teb);
- ASSERT(NT_SUCCESS(Status));
+ if (!NT_SUCCESS(Status))
+ {
+ /* Cleanup and exit */
+ KeDetachProcess();
+ return Status;
+ }
//
// Use SEH in case we can't load the TEB