[wininet/ftp #2] Move a definition in FTP_FtpFindFirstFileW
(Coverity)
Paul Vriens
paul.vriens.wine at gmail.com
Tue Mar 20 12:40:25 CDT 2007
Hi,
By moving the definition of hIC we make sure we don't have a NULL hIC on one of
the error-paths.
Should satisfy Coverity CID-170.
Changelog
Move a definition in FTP_FtpFindFirstFileW
Cheers,
Paul.
-------------- next part --------------
>From 93992cc307d13fc39009551225ff9e01ca9e29b7 Mon Sep 17 00:00:00 2001
From: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Tue, 20 Mar 2007 18:38:14 +0100
Subject: [PATCH] Move a definition in FTP_FtpFindFirstFileW
---
dlls/wininet/ftp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 05f6b36..526c65e 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -737,7 +737,6 @@ HINTERNET WINAPI FTP_FtpFindFirstFileW(LPWININETFTPSESSIONW lpwfs,
if (!FTP_SendPortOrPasv(lpwfs))
goto lend;
- hIC = lpwfs->lpAppInfo;
if (!FTP_SendCommand(lpwfs->sndSocket, FTP_CMD_LIST, NULL,
lpwfs->hdr.lpfnStatusCB, &lpwfs->hdr, lpwfs->hdr.dwContext))
goto lend;
@@ -767,6 +766,7 @@ lend:
if (lpwfs->lstnSocket != -1)
closesocket(lpwfs->lstnSocket);
+ hIC = lpwfs->lpAppInfo;
if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC)
{
INTERNET_ASYNC_RESULT iar;
--
1.4.4.2
More information about the wine-patches
mailing list