summaryrefslogtreecommitdiff
path: root/NetworkPkg/HttpDxe/HttpImpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpImpl.c')
-rw-r--r--NetworkPkg/HttpDxe/HttpImpl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index 50c0617436..09ee379150 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -486,10 +486,6 @@ EfiHttpRequest (
goto Error4;
}
- if (HostName != NULL) {
- FreePool (HostName);
- }
-
//
// Transmit the request message.
//
@@ -505,6 +501,10 @@ EfiHttpRequest (
DispatchDpc ();
+ if (HostName != NULL) {
+ FreePool (HostName);
+ }
+
return EFI_SUCCESS;
Error5: