Author: cgutman
Date: Wed Sep 10 04:34:28 2008
New Revision: 36115
URL:
http://svn.reactos.org/svn/reactos?rev=36115&view=rev
Log:
- Fix 3 handle leaks
- Fix 2 memory leaks
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/config.c
branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/config.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/config.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/config.c [iso-8859-1] Wed Sep
10 04:34:28 2008
@@ -283,6 +283,7 @@
if(!ConfigurationContext)
{
NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n"));
+ ZwClose(KeyHandle);
*ConfigurationHandle = NULL;
*Status = NDIS_STATUS_FAILURE;
return;
@@ -849,6 +850,7 @@
if(!ConfigurationContext)
{
NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n"));
+ ZwClose(RegKeyHandle);
*Status = NDIS_STATUS_FAILURE;
return;
}
@@ -907,6 +909,7 @@
if(!ConfigurationContext)
{
NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n"));
+ ZwClose(RegKeyHandle);
*Status = NDIS_STATUS_FAILURE;
return;
}
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c [iso-8859-1] Wed Sep 10
04:34:28 2008
@@ -407,6 +407,7 @@
if(!NT_SUCCESS(NtStatus))
{
NDIS_DbgPrint(MIN_TRACE, ("IoAllocateAdapterChannel failed: 0x%x\n",
NtStatus));
+ ExFreePool(Adapter->MapRegisters);
return NDIS_STATUS_RESOURCES;
}
@@ -417,6 +418,7 @@
if(!NT_SUCCESS(NtStatus))
{
NDIS_DbgPrint(MIN_TRACE, ("KeWaitForSingleObject failed: 0x%x\n",
NtStatus));
+ ExFreePool(Adapter->MapRegisters);
return NDIS_STATUS_RESOURCES;
}