Author: cgutman
Date: Thu Sep 4 13:42:49 2008
New Revision: 35944
URL:
http://svn.reactos.org/svn/reactos?rev=35944&view=rev
Log:
- Fix 2 memory leaks
- Set ParameterValue to NULL on failure
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/config.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] Thu Sep
4 13:42:49 2008
@@ -521,9 +521,11 @@
ExFreePool(KeyInformation);
- if(*Status != STATUS_SUCCESS)
+ if(*Status != STATUS_SUCCESS) {
+ ExFreePool(*ParameterValue);
+ *ParameterValue = NULL;
*Status = NDIS_STATUS_FAILURE;
- else
+ } else
*Status = NDIS_STATUS_SUCCESS;
return;
@@ -567,6 +569,7 @@
if(!MiniportResource)
{
NDIS_DbgPrint(MIN_TRACE,("Insufficient resources.\n"));
+ ExFreePool(RegData);
ExFreePool(KeyInformation);
ExFreePool(*ParameterValue);
*ParameterValue = NULL;