wininet: Avoid dead code in FTP_FtpOpenFileW (Coverity)

Frédéric Delanoy frederic.delanoy at gmail.com
Wed Jan 25 16:52:02 CST 2012


lpwh is only set to a valid (non-NULL) object iff bSuccess == TRUE

CID 1494
---
 dlls/wininet/ftp.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 74316b9..dc5bc12 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -1425,11 +1425,8 @@ static HINTERNET FTP_FtpOpenFileW(ftp_session_t *lpwfs,
         }
     }
 
-    if(!bSuccess) {
-        if(lpwh)
-            WININET_Release( &lpwh->hdr );
+    if(!bSuccess)
         return FALSE;
-    }
 
     return lpwh->hdr.hInternet;
 }
-- 
1.7.8.3




More information about the wine-patches mailing list