]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
NetworkPkg: Fix memory leak problem in PXE driver.
[mirror_edk2.git] / NetworkPkg / UefiPxeBcDxe / PxeBcDriver.c
index 09c5753ad9e79938f1c129b350c3ad39aa9d8b2f..8dd787be1a00aed74701804713b3d7a6ff77ed75 100644 (file)
@@ -2,7 +2,7 @@
   Driver Binding functions implementationfor for UefiPxeBc Driver.\r
 \r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -254,6 +254,7 @@ PxeBcDestroyIp4Children (
            &Private->PxeBc,\r
            NULL\r
            );\r
+    FreePool (Private->Ip4Nic->DevicePath);\r
 \r
     if (Private->Snp != NULL) { \r
       //\r
@@ -414,6 +415,8 @@ PxeBcDestroyIp6Children (
            &Private->PxeBc,\r
            NULL\r
            );\r
+    FreePool (Private->Ip6Nic->DevicePath);\r
+    \r
     if (Private->Snp != NULL) {\r
       //\r
       // Close SNP from the child virtual handle\r