[ros-diffs] [hbirr] 14493: Check for an valid mdl pointer before calling IoFreeMdl in IoReadWriteCompletion.

hbirr at svn.reactos.com hbirr at svn.reactos.com
Tue Apr 5 01:11:21 CEST 2005


Check for an valid mdl pointer before calling IoFreeMdl in
IoReadWriteCompletion.
Modified: trunk/reactos/ntoskrnl/io/cleanup.c
  _____  

Modified: trunk/reactos/ntoskrnl/io/cleanup.c
--- trunk/reactos/ntoskrnl/io/cleanup.c	2005-04-04 23:09:15 UTC (rev
14492)
+++ trunk/reactos/ntoskrnl/io/cleanup.c	2005-04-04 23:11:19 UTC (rev
14493)
@@ -1,4 +1,4 @@

-/* $Id:$
+/* $Id$
  * 
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -109,7 +109,10 @@
 
    if (DeviceObject->Flags & DO_DIRECT_IO)
    {
-      IoFreeMdl(Irp->MdlAddress);
+      if (Irp->MdlAddress)
+      {
+         IoFreeMdl(Irp->MdlAddress);
+      }
    }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050405/c5f4649a/attachment.html


More information about the Ros-diffs mailing list