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.
//
@ -656,6 +658,10 @@ EfiHttpRequest (
if (HostName != NULL) {
FreePool (HostName);
}
if (UrlParser != NULL) {
HttpUrlFreeParser (UrlParser);
}
return EFI_SUCCESS;
@ -699,7 +705,7 @@ Error1:
if (Wrap != NULL) {
FreePool (Wrap);
}
if (UrlParser!= NULL) {
if (UrlParser != NULL) {
HttpUrlFreeParser (UrlParser);
}