diff options
author | Nagaraj Hegde <nagaraj-p.hegde@hpe.com> | 2015-10-30 06:47:54 +0000 |
---|---|---|
committer | tye1 <tye1@Edk2> | 2015-10-30 06:47:54 +0000 |
commit | cdf8c32ec169db14d4824c659159e2b6b6bed540 (patch) | |
tree | ae1ffbe75ca60118d82b032c62a215e80fc053f1 /NetworkPkg | |
parent | 843f8ca01bc195cd077f13512fe285e8db9a3984 (diff) | |
download | edk2-platforms-cdf8c32ec169db14d4824c659159e2b6b6bed540.tar.xz |
NetworkPkg: HttpDxe sometimes free a pointer twice
In EfiHttpRequest, HostName was getting freed twice whenever
HttpTransmitTcp4 failed. Moved FreePool (HostName) after
HttpTransmitTcp4 call to avoid a double free.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Nagaraj Hegde <nagaraj-p.hegde@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18709 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/HttpDxe/HttpImpl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 588e1bb649..30944004ae 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -485,10 +485,6 @@ EfiHttpRequest ( goto Error4;
}
- if (HostName != NULL) {
- FreePool (HostName);
- }
-
//
// Transmit the request message.
//
@@ -504,6 +500,10 @@ EfiHttpRequest ( DispatchDpc ();
+ if (HostName != NULL) {
+ FreePool (HostName);
+ }
+
return EFI_SUCCESS;
Error5:
|