From 3666990b0fb7f099acac658b471ae7280168f3c8 Mon Sep 17 00:00:00 2001 From: Nagaraj Hegde Date: Fri, 6 Nov 2015 09:35:09 +0000 Subject: 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 Reviewed-by: Fu Siyuan Reviewed-by: Zhang Lubo git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18735 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/HttpDxe/HttpImpl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'NetworkPkg/HttpDxe') 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; -- cgit v1.2.3