Module: wine Branch: master Commit: 5a11a1201fc4fedf4cd8b3ee9534f0164c16f081 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5a11a1201fc4fedf4cd8b3ee95...
Author: Misha Koshelev mk144210@bcm.edu Date: Thu Aug 16 00:03:49 2007 -0500
urlmon: Call IInternetProtocolSink_Release and ReleaseStgMedium in HttpProtocol where native does.
---
dlls/urlmon/http.c | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c index ac4b554..4b2eae5 100644 --- a/dlls/urlmon/http.c +++ b/dlls/urlmon/http.c @@ -142,11 +142,6 @@ static void HTTPPROTOCOL_AllDataRead(HttpProtocol *This)
static void HTTPPROTOCOL_Close(HttpProtocol *This) { - if (This->protocol_sink) - { - IInternetProtocolSink_Release(This->protocol_sink); - This->protocol_sink = 0; - } if (This->http_negotiate) { IHttpNegotiate_Release(This->http_negotiate); @@ -173,11 +168,6 @@ static void HTTPPROTOCOL_Close(HttpProtocol *This) HeapFree(GetProcessHeap(), 0, This->full_header); This->full_header = 0; } - if (This->bind_info.cbSize) - { - ReleaseBindInfo(&This->bind_info); - memset(&This->bind_info, 0, sizeof(This->bind_info)); - } This->flags = 0; }
@@ -214,6 +204,18 @@ static void CALLBACK HTTPPROTOCOL_InternetStatusCallback( else IInternetProtocol_Continue((IInternetProtocol *)This, &data); return; + case INTERNET_STATUS_HANDLE_CLOSING: + 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)); + } + return; default: WARN("Unhandled Internet status callback %d\n", dwInternetStatus); return;