Huw Davies : winhttp: Fix a reference leak.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 21 13:08:52 CDT 2015


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Jul 21 15:12:42 2015 +0100

winhttp: Fix a reference leak.

---

 dlls/winhttp/session.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index 1b54288..109ca3a 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -2038,8 +2038,6 @@ BOOL WINAPI WinHttpSetTimeouts( HINTERNET handle, int resolve, int connect, int
                 if (netconn_set_timeout( &request->netconn, TRUE, send )) ret = FALSE;
                 if (netconn_set_timeout( &request->netconn, FALSE, receive )) ret = FALSE;
             }
-
-            release_object( &request->hdr );
             break;
 
         case WINHTTP_HANDLE_TYPE_SESSION:
@@ -2057,10 +2055,10 @@ BOOL WINAPI WinHttpSetTimeouts( HINTERNET handle, int resolve, int connect, int
             break;
 
         default:
-            release_object( hdr );
             set_last_error( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE );
-            return FALSE;
+            ret = FALSE;
     }
+    release_object( hdr );
     return ret;
 }
 




More information about the wine-cvs mailing list