[ros-diffs] [cgutman] 35343: - Fix a possible crash - Fix 2 memory leaks

cgutman at svn.reactos.org cgutman at svn.reactos.org
Thu Aug 14 19:13:11 CEST 2008


Author: cgutman
Date: Thu Aug 14 12:13:11 2008
New Revision: 35343

URL: http://svn.reactos.org/svn/reactos?rev=35343&view=rev
Log:
 - Fix a possible crash
 - Fix 2 memory leaks

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

Modified: branches/aicom-network-fixes/drivers/network/afd/afd/main.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/network/afd/afd/main.c?rev=35343&r1=35342&r2=35343&view=diff
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/main.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/main.c [iso-8859-1] Thu Aug 14 12:13:11 2008
@@ -210,8 +210,12 @@
 	ExFreePool( FCB->LocalAddress );
     if( FCB->RemoteAddress )
 	ExFreePool( FCB->RemoteAddress );
-
-    ExFreePool(FCB->TdiDeviceName.Buffer);
+    if( FCB->ListenIrp.ConnectionReturnInfo )
+	ExFreePool( FCB->ListenIrp.ConnectionReturnInfo );
+    if( FCB->ListenIrp.ConnectionCallInfo )
+	ExFreePool( FCB->ListenIrp.ConnectionCallInfo );
+    if( FCB->TdiDeviceName.Buffer )
+	ExFreePool(FCB->TdiDeviceName.Buffer);
 
     ExFreePool(FCB);
     AFD_DbgPrint(MIN_TRACE,("Deleted (%x)\n", FCB));



More information about the Ros-diffs mailing list