[NTOSKRNL]
authorEric Kohl <eric.kohl@reactos.org>
Sun, 5 Jul 2015 09:58:03 +0000 (09:58 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 5 Jul 2015 09:58:03 +0000 (09:58 +0000)
NtQuerySystemInformation: Return ResultLength only in case of success.

svn path=/trunk/; revision=68346

reactos/ntoskrnl/ex/sysinfo.c

index b77e0a1..6d99e0a 100644 (file)
@@ -2440,7 +2440,7 @@ NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
                                                             &ResultLength);
 
             /* Save the result length to the caller */
                                                             &ResultLength);
 
             /* Save the result length to the caller */
-            if (UnsafeResultLength)
+            if (NT_SUCCESS(FStatus) && UnsafeResultLength)
                 *UnsafeResultLength = ResultLength;
         }
     }
                 *UnsafeResultLength = ResultLength;
         }
     }