From c250617d8820040fcfc58d021ebbcaa5a4882502 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sun, 29 Oct 2006 18:48:48 +0100 Subject: [PATCH] wininet: Store WININETAPPINFOW pointer in WININETHTTPSESSIONW. --- dlls/wininet/http.c | 5 +++++ dlls/wininet/internet.h | 1 + 2 files changed, 6 insertions(+) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 0d564bea93c..e56ea4ecaee 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2405,6 +2405,9 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, lpwhs->hdr.destroy = HTTP_CloseHTTPSessionHandle; lpwhs->hdr.lpfnStatusCB = hIC->hdr.lpfnStatusCB; + WININET_AddRef( &hIC->hdr ); + lpwhs->lpAppInfo = hIC; + handle = WININET_AllocHandle( &lpwhs->hdr ); if (NULL == handle) { @@ -2967,6 +2970,8 @@ static void HTTP_CloseHTTPSessionHandle(LPWININETHANDLEHEADER hdr) TRACE("%p\n", lpwhs); + WININET_Release(&lpwhs->lpAppInfo->hdr); + HeapFree(GetProcessHeap(), 0, lpwhs->lpszHostName); HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName); diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 2f81db1a03d..9c4e7d241ef 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -165,6 +165,7 @@ typedef struct typedef struct { WININETHANDLEHEADER hdr; + WININETAPPINFOW *lpAppInfo; LPWSTR lpszHostName; /* the final destination of the request */ LPWSTR lpszServerName; /* the name of the server we directly connect to */ LPWSTR lpszUserName;