[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.

svn path=/trunk/; revision=71815
This commit is contained in:
Hermès Bélusca-Maïto 2016-07-04 22:23:07 +00:00
parent 8b24e1b048
commit 348c8da73d

View file

@ -757,7 +757,12 @@ MmCreateTeb(IN PEPROCESS Process,
// Allocate the TEB // Allocate the TEB
// //
Status = MiCreatePebOrTeb(Process, sizeof(TEB), (PULONG_PTR)&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 // Use SEH in case we can't load the TEB