From: Samer El-Haj-Mahmoud Date: Tue, 2 Dec 2014 01:51:37 +0000 (+0000) Subject: Fix memory leak in Ip4Config. X-Git-Tag: edk2-stable201903~10568 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=b8ff0f16d9a01be8b972f3ea78bc64459d0ad6ba Fix memory leak in Ip4Config. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud Reviewed-by: Fu Siyuan Reviewed-by: Tian Feng git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16465 6f19259b-4bc3-4df7-8a09-765794883524 --- 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.
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
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; }