summaryrefslogtreecommitdiff
path: root/NetworkPkg/HttpDxe
diff options
context:
space:
mode:
authorNagaraj Hegde <nagaraj-p.hegde@hpe.com>2015-11-18 08:34:44 +0000
committervanjeff <vanjeff@Edk2>2015-11-18 08:34:44 +0000
commitba82c72fc4d4f9230d3bf5d0a69b14e44d5105cf (patch)
treea5f5bd61f5c2c1081ca491cdbc443ce7daafeb6e /NetworkPkg/HttpDxe
parentf295c2f6be7acef091e06582095c8d3f0811ea8c (diff)
downloadedk2-platforms-ba82c72fc4d4f9230d3bf5d0a69b14e44d5105cf.tar.xz
NetworkPkg:Missing CloseEvent() in HttpResponseWorker
Two additional scenarios in which CloseEvent() needs to be called: When sending a request to http server using HTTP Head method, if the process is success, we did a response call, and then go to exit without close the event in Rxtoken in wrap structure and in httpinstance struceure, so another call() to response using http get method to receive http header, those events are not closed either.. (Sync patch r18735 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Nagaraj Hegde <nagaraj-p.hegde@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18873 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/HttpDxe')
-rw-r--r--NetworkPkg/HttpDxe/HttpImpl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index 09ee379150..de3ec9c284 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -1131,6 +1131,18 @@ Exit:
}
Token->Status = Status;
gBS->SignalEvent (Token->Event);
+
+ if (Wrap != NULL) {
+ if (Wrap->TcpWrap.RxToken.CompletionToken.Event != NULL) {
+ gBS->CloseEvent (Wrap->TcpWrap.RxToken.CompletionToken.Event);
+ }
+ }
+
+ if (HttpInstance->RxToken.CompletionToken.Event != NULL) {
+ gBS->CloseEvent (HttpInstance->RxToken.CompletionToken.Event);
+ HttpInstance->RxToken.CompletionToken.Event = NULL;
+ }
+
FreePool (Wrap);
return Status;