[NTOSKRNL]
authorPierre Schweitzer <pierre@reactos.org>
Wed, 18 Mar 2015 15:26:46 +0000 (15:26 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 18 Mar 2015 15:26:46 +0000 (15:26 +0000)
Also partly revert r66781.
By Stefan G.

svn path=/trunk/; revision=66784

reactos/ntoskrnl/ke/i386/traphdlr.c
reactos/ntoskrnl/ps/win32.c

index b485f15..627c32c 100644 (file)
@@ -1673,7 +1673,6 @@ KiSystemServiceHandler(IN PKTRAP_FRAME TrapFrame,
         if (!NT_SUCCESS(Result))
         {
             /* Set the last error and fail */
-            NtCurrentTeb()->LastErrorValue = RtlNtStatusToDosError(Result);
             goto ExitCall;
         }
 
index c80f1b9..acb2b8b 100644 (file)
@@ -9,6 +9,7 @@
 /* INCLUDES ****************************************************************/
 
 #include <ntoskrnl.h>
+#include <winerror.h>
 #define NDEBUG
 #include <debug.h>
 
@@ -63,6 +64,7 @@ PsConvertToGuiThread(VOID)
         if (!NewStack)
         {
             /* Panic in user-mode */
+            NtCurrentTeb()->LastErrorValue = ERROR_NOT_ENOUGH_MEMORY;
             return STATUS_NO_MEMORY;
         }