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
This commit is contained in:
Samer El-Haj-Mahmoud 2014-12-02 01:51:37 +00:00 committed by sfu5
parent 62771cee1d
commit b8ff0f16d9

View File

@ -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;
}