summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNagaraj Hegde <nagaraj-p.hegde@hpe.com>2015-11-06 09:35:09 +0000
committerluobozhang <luobozhang@Edk2>2015-11-06 09:35:09 +0000
commit3666990b0fb7f099acac658b471ae7280168f3c8 (patch)
tree20d0d60bd033bc34002c947cddb5d720fdc9b3d6
parentf25da33d13357f5e6065e297f5f361e5743ce72f (diff)
downloadedk2-platforms-3666990b0fb7f099acac658b471ae7280168f3c8.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.. 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/trunk/edk2@18735 6f19259b-4bc3-4df7-8a09-765794883524
-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 30944004ae..f1e3e53411 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -1130,6 +1130,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;