Misha Koshelev : urlmon: Release IInternetProtocolSink and BindInfo on request handle closure, not on first handle closure.
Alexandre Julliard
julliard at winehq.org
Mon Nov 12 06:27:40 CST 2007
Module: wine
Branch: master
Commit: 0a158e7aa33dd099163e8552d67c0dc66d87b42f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0a158e7aa33dd099163e8552d67c0dc66d87b42f
Author: Misha Koshelev <mk144210 at bcm.edu>
Date: Sun Nov 11 00:56:12 2007 -0600
urlmon: Release IInternetProtocolSink and BindInfo on request handle closure, not on first handle closure.
---
dlls/urlmon/http.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index 46243e6..a8e5c16 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -148,15 +148,9 @@ static void HTTPPROTOCOL_Close(HttpProtocol *This)
This->http_negotiate = 0;
}
if (This->request)
- {
InternetCloseHandle(This->request);
- This->request = 0;
- }
if (This->connect)
- {
InternetCloseHandle(This->connect);
- This->connect = 0;
- }
if (This->internet)
{
InternetCloseHandle(This->internet);
@@ -208,15 +202,23 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback(
IInternetProtocol_AddRef((IInternetProtocol *)This);
return;
case INTERNET_STATUS_HANDLE_CLOSING:
- if (This->protocol_sink)
+ if (*(HINTERNET *)lpvStatusInformation == This->connect)
{
- IInternetProtocolSink_Release(This->protocol_sink);
- This->protocol_sink = 0;
+ This->connect = 0;
}
- if (This->bind_info.cbSize)
+ else if (*(HINTERNET *)lpvStatusInformation == This->request)
{
- ReleaseBindInfo(&This->bind_info);
- memset(&This->bind_info, 0, sizeof(This->bind_info));
+ This->request = 0;
+ if (This->protocol_sink)
+ {
+ IInternetProtocolSink_Release(This->protocol_sink);
+ This->protocol_sink = 0;
+ }
+ if (This->bind_info.cbSize)
+ {
+ ReleaseBindInfo(&This->bind_info);
+ memset(&This->bind_info, 0, sizeof(This->bind_info));
+ }
}
IInternetProtocol_Release((IInternetProtocol *)This);
return;
More information about the wine-cvs
mailing list