]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix memory leak in Ip4Config.
authorSamer El-Haj-Mahmoud <elhaj@hp.com>
Tue, 2 Dec 2014 01:51:37 +0000 (01:51 +0000)
committersfu5 <sfu5@Edk2>
Tue, 2 Dec 2014 01:51:37 +0000 (01:51 +0000)
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

MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c

index 3eff1882e779dfccbda8e0c06c3acaed4dbfc897..3d2f0a4f9b240e443f4991790029f7cdefd95ac0 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
   This code implements the IP4Config and NicIp4Config protocols.\r
 \r
+Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>\r
 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -656,7 +657,7 @@ Ip4ConfigCleanDhcp4 (
     This->Dhcp4Handle = NULL;\r
   }\r
 \r
-  if (This->Dhcp4Event == NULL) {\r
+  if (This->Dhcp4Event != NULL) {\r
     gBS->CloseEvent (This->Dhcp4Event);\r
     This->Dhcp4Event = NULL;\r
   }\r