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/netw... ============================================================================== --- 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));