mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 15:38:37 +00:00
[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:
parent
8b24e1b048
commit
348c8da73d
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue