Nigel Liang : wininet: Release object in HttpEndRequestW after use.

Alexandre Julliard julliard at winehq.org
Thu Oct 18 07:59:39 CDT 2007


Module: wine
Branch: master
Commit: 7d2ac2039b3212b1a2b6dccdda3fc0640787a696
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7d2ac2039b3212b1a2b6dccdda3fc0640787a696

Author: Nigel Liang <ncliang at gmail.com>
Date:   Wed Oct 17 17:07:41 2007 -0700

wininet: Release object in HttpEndRequestW after use.

---

 dlls/wininet/http.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 454d332..70239f7 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -830,6 +830,8 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest,
     if (NULL == lpwhr || lpwhr->hdr.htype != WH_HHTTPREQ)
     {
         INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
+        if (lpwhr)
+            WININET_Release( &lpwhr->hdr );
     	return FALSE;
     }
 
@@ -881,6 +883,7 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest,
         }
     }
 
+    WININET_Release( &lpwhr->hdr );
     TRACE("%i <--\n",rc);
     return rc;
 }




More information about the wine-cvs mailing list