]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
Fix memory leak in Ip4Config.
[mirror_edk2.git] / 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