diff options
author | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-05-14 03:01:51 +0000 |
---|---|---|
committer | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-05-14 03:01:51 +0000 |
commit | 3d2367a2a748e87220a8aa5aa006448759d11be1 (patch) | |
tree | 0b7512e4722e2656f49d699dbb71f20bcaef648b /NetworkPkg | |
parent | d7bb8de9b956efbf2ec51dc2d613b361a08e6712 (diff) | |
download | edk2-platforms-3d2367a2a748e87220a8aa5aa006448759d11be1.tar.xz |
Fix bug in PXE driver: memory may be freed before use.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14354 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c index 0b2743d127..8ee831f521 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c @@ -1353,9 +1353,6 @@ ON_ERROR: &gEfiCallerIdGuid,
&Private->Id
);
- if (Private != NULL) {
- FreePool (Private);
- }
}
if (IpVersion == IP_VERSION_4) {
@@ -1364,6 +1361,10 @@ ON_ERROR: PxeBcDestroyIp6Children (This, Private);
}
+ if (FirstStart && Private != NULL) {
+ FreePool (Private);
+ }
+
return Status;
}
|