Author: hpoussin
Date: Sat Mar  3 21:11:42 2012
New Revision: 55975

URL: http://svn.reactos.org/svn/reactos?rev=55975&view=rev
Log:
ntoskrnl: fix pointer dereference before testing for it

Modified:
    trunk/reactos/ntoskrnl/cache/section/sptab.c

Modified: trunk/reactos/ntoskrnl/cache/section/sptab.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/sptab.c?rev=55975&r1=55974&r2=55975&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/sptab.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/sptab.c [iso-8859-1] Sat Mar  3 
21:11:42 2012
@@ -117,12 +117,12 @@
         SectionZeroPageTable.Refcount = 1;
         PageTableSlice = RtlInsertElementGenericTable
             (Table, &SectionZeroPageTable, sizeof(SectionZeroPageTable), NULL);
+        if (!PageTableSlice) return NULL;
         DPRINT
             ("Allocate page table %x (%08x%08x)\n", 
              PageTableSlice,
              PageTableSlice->FileOffset.u.HighPart,
              PageTableSlice->FileOffset.u.LowPart);
-        if (!PageTableSlice) return NULL;
     }
     return PageTableSlice;
 }


Reply via email to