mirror of https://github.com/acidanthera/audk.git
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:
parent
0d07e6fb53
commit
c0a0a5a5c7
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue