[ros-diffs] [arty] 36015: Add proper error case for buffer pin, spotted by aicom.

arty at svn.reactos.org arty at svn.reactos.org
Sun Sep 7 04:07:07 CEST 2008


Author: arty
Date: Sat Sep  6 21:07:07 2008
New Revision: 36015

URL: http://svn.reactos.org/svn/reactos?rev=36015&view=rev
Log:
Add proper error case for buffer pin, spotted by aicom.

Modified:
    branches/arty-newcc/ntoskrnl/cache/pinsup.c

Modified: branches/arty-newcc/ntoskrnl/cache/pinsup.c
URL: http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/pinsup.c?rev=36015&r1=36014&r2=36015&view=diff
==============================================================================
--- branches/arty-newcc/ntoskrnl/cache/pinsup.c [iso-8859-1] (original)
+++ branches/arty-newcc/ntoskrnl/cache/pinsup.c [iso-8859-1] Sat Sep  6 21:07:07 2008
@@ -660,6 +660,9 @@
 	     FALSE,
 	     FALSE,
 	     NULL);
+
+	if(!TheBcb->Pinned) return FALSE;
+
 	_SEH_TRY
 	{
 	    MmProbeAndLockPages(TheBcb->Pinned, KernelMode, IoReadAccess);
@@ -668,7 +671,7 @@
 	{
 	    IoFreeMdl(TheBcb->Pinned);
 	    TheBcb->Pinned = NULL;
-	    Result = FALSE;
+	    _SEH_YIELD(return FALSE);
 	}
 	_SEH_END;
     }



More information about the Ros-diffs mailing list