wininet: Store pointer to WININETHTTPSESSIONW in WININETHTTPREQUESTW.
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 2d39608..cfbda27 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -1009,6 +1009,9 @@
     lpwhr->hdr.destroy = HTTP_CloseHTTPRequestHandle;
     lpwhr->hdr.lpfnStatusCB = lpwhs->hdr.lpfnStatusCB;
 
+    WININET_AddRef( &lpwhs->hdr );
+    lpwhr->lpHttpSession = lpwhs;
+
     handle = WININET_AllocHandle( &lpwhr->hdr );
     if (NULL == handle)
     {
@@ -2938,6 +2941,8 @@
 
     TRACE("\n");
 
+    WININET_Release(&lpwhr->hdr);
+
     if (NETCON_connected(&lpwhr->netConnection))
         HTTP_CloseConnection(lpwhr);