summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2018-01-02 11:52:40 +0800
committerFu Siyuan <siyuan.fu@intel.com>2018-01-04 09:07:32 +0800
commit2fad330f6baf350f80d043529f6a78ffec75daaa (patch)
tree94fd0a83081f7c70e5046721057485a9d8385d9c /NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
parent9f4f29cbeec4b7eaa822e5377a749d0721853e36 (diff)
downloadedk2-2fad330f6baf350f80d043529f6a78ffec75daaa.tar.gz
edk2-2fad330f6baf350f80d043529f6a78ffec75daaa.tar.bz2
edk2-2fad330f6baf350f80d043529f6a78ffec75daaa.zip
NetworkPkg: Fix memory leak problem in PXE driver.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Diffstat (limited to 'NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c')
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
index 09c5753ad9..8dd787be1a 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
@@ -2,7 +2,7 @@
Driver Binding functions implementationfor for UefiPxeBc Driver.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2018, 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
@@ -254,6 +254,7 @@ PxeBcDestroyIp4Children (
&Private->PxeBc,
NULL
);
+ FreePool (Private->Ip4Nic->DevicePath);
if (Private->Snp != NULL) {
//
@@ -414,6 +415,8 @@ PxeBcDestroyIp6Children (
&Private->PxeBc,
NULL
);
+ FreePool (Private->Ip6Nic->DevicePath);
+
if (Private->Snp != NULL) {
//
// Close SNP from the child virtual handle