summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamer El-Haj-Mahmoud <elhaj@hp.com>2014-12-02 01:51:37 +0000
committersfu5 <sfu5@Edk2>2014-12-02 01:51:37 +0000
commitb8ff0f16d9a01be8b972f3ea78bc64459d0ad6ba (patch)
tree444b6b7a9e2959ac331e716b96a726dc5cdb37d1
parent62771cee1d453fbb0dd2e38953e0d8b3a4506fa4 (diff)
downloadedk2-platforms-b8ff0f16d9a01be8b972f3ea78bc64459d0ad6ba.tar.xz
Fix memory leak in Ip4Config.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Tian Feng <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16465 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
index 3eff1882e7..3d2f0a4f9b 100644
--- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
+++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
@@ -1,6 +1,7 @@
/** @file
This code implements the IP4Config and NicIp4Config protocols.
+Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -656,7 +657,7 @@ Ip4ConfigCleanDhcp4 (
This->Dhcp4Handle = NULL;
}
- if (This->Dhcp4Event == NULL) {
+ if (This->Dhcp4Event != NULL) {
gBS->CloseEvent (This->Dhcp4Event);
This->Dhcp4Event = NULL;
}