[ros-diffs] [cgutman] 35297: - Don't crash if we are already freed - Some code frees the buffers right after an operation fails which is fine

cgutman at svn.reactos.org cgutman at svn.reactos.org
Wed Aug 13 04:55:05 CEST 2008


Author: cgutman
Date: Tue Aug 12 21:55:05 2008
New Revision: 35297

URL: http://svn.reactos.org/svn/reactos?rev=35297&view=rev
Log:
 - Don't crash if we are already freed
 - Some code frees the buffers right after an operation fails which is fine

Modified:
    branches/aicom-network-fixes/drivers/network/afd/afd/lock.c

Modified: branches/aicom-network-fixes/drivers/network/afd/afd/lock.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/network/afd/afd/lock.c?rev=35297&r1=35296&r2=35297&view=diff
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/lock.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/lock.c [iso-8859-1] Tue Aug 12 21:55:05 2008
@@ -112,6 +112,8 @@
     PAFD_MAPBUF Map = (PAFD_MAPBUF)(Buf + Count + Lock);
     UINT i;
 
+    if( !Buf ) return;
+
     for( i = 0; i < Count + Lock; i++ ) {
 	if( Map[i].Mdl ) {
 	    MmUnlockPages( Map[i].Mdl );



More information about the Ros-diffs mailing list