[ros-diffs] [jgardou] 56001: [NTOSKRNL] - fix code assuming System process pointer is never NULL, which is the case when we're creating it.
jgardou at svn.reactos.org
jgardou at svn.reactos.org
Sun Mar 4 17:57:44 UTC 2012
Author: jgardou
Date: Sun Mar 4 17:57:44 2012
New Revision: 56001
URL: http://svn.reactos.org/svn/reactos?rev=56001&view=rev
Log:
[NTOSKRNL]
- fix code assuming System process pointer is never NULL, which is the case when we're creating it.
Modified:
trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ntoskrnl/ps/process.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=56001&r1=56000&r2=56001&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] Sun Mar 4 17:57:44 2012
@@ -464,8 +464,9 @@
/* Assume no section object */
SectionObject = NULL;
- /* Is the parent the initial process? */
- if (Parent != PsInitialSystemProcess)
+ /* Is the parent the initial process?
+ * Check for NULL also, as at initialization PsInitialSystemProcess is NULL */
+ if (Parent != PsInitialSystemProcess && (Parent != NULL))
{
/* It's not, so acquire the process rundown */
if (ExAcquireRundownProtection(&Parent->RundownProtect))
More information about the Ros-diffs
mailing list