mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
843f8ca01b
commit
cdf8c32ec1
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue