NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest().

Cc: Wang Fan <fan.wang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Wang Fan <fan.wang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
Jiaxin Wu 2017-12-26 11:10:34 +08:00
parent 0d07e6fb53
commit c0a0a5a5c7
1 changed files with 7 additions and 1 deletions

View File

@ -472,6 +472,8 @@ EfiHttpRequest (
FreePool (HostName);
HttpUrlFreeParser (UrlParser);
//
// Queue the HTTP token and return.
//
@ -657,6 +659,10 @@ EfiHttpRequest (
FreePool (HostName);
}
if (UrlParser != NULL) {
HttpUrlFreeParser (UrlParser);
}
return EFI_SUCCESS;
Error5:
@ -699,7 +705,7 @@ Error1:
if (Wrap != NULL) {
FreePool (Wrap);
}
if (UrlParser!= NULL) {
if (UrlParser != NULL) {
HttpUrlFreeParser (UrlParser);
}