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
goto Error4;\r
}\r
\r
- if (HostName != NULL) {\r
- FreePool (HostName);\r
- }\r
-\r
//\r
// Transmit the request message.\r
//\r
\r
DispatchDpc ();\r
\r
+ if (HostName != NULL) {\r
+ FreePool (HostName);\r
+ }\r
+\r
return EFI_SUCCESS;\r
\r
Error5:\r