Cc: Wang Fan <[email protected]>
Cc: Ye Ting <[email protected]>
Cc: Fu Siyuan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <[email protected]>
---
 NetworkPkg/HttpDxe/HttpImpl.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index 57fa39f..fe1c3b7 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -470,10 +470,12 @@ EfiHttpRequest (
 
           Wrap->TcpWrap.Method = Request->Method;
 
           FreePool (HostName);
 
+          HttpUrlFreeParser (UrlParser);
+
           //
           // Queue the HTTP token and return.
           //
           return EFI_SUCCESS;
         } else {
@@ -654,10 +656,14 @@ EfiHttpRequest (
   DispatchDpc ();
   
   if (HostName != NULL) {
     FreePool (HostName);
   }
+
+  if (UrlParser != NULL) {
+    HttpUrlFreeParser (UrlParser);
+  }
   
   return EFI_SUCCESS;
 
 Error5:
   //
@@ -697,11 +703,11 @@ Error1:
     FreePool (HostName);
   }
   if (Wrap != NULL) {
     FreePool (Wrap);
   }
-  if (UrlParser!= NULL) {
+  if (UrlParser != NULL) {
     HttpUrlFreeParser (UrlParser);
   }
 
   return Status;
   
-- 
1.9.5.msysgit.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to