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.
|
||||
//
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue