Commit 8dcb4479 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

wininet: Make sure hIC is valid before trying to use it. (Coverity)

parent f9fc4b86
...@@ -252,6 +252,7 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile, ...@@ -252,6 +252,7 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
/* Clear any error information */ /* Clear any error information */
INTERNET_SetLastError(0); INTERNET_SetLastError(0);
hIC = (LPWININETAPPINFOW) lpwfs->hdr.lpwhparent;
/* Open file to be uploaded */ /* Open file to be uploaded */
if (INVALID_HANDLE_VALUE == if (INVALID_HANDLE_VALUE ==
...@@ -261,7 +262,6 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile, ...@@ -261,7 +262,6 @@ BOOL WINAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
goto lend; goto lend;
} }
hIC = (LPWININETAPPINFOW) lpwfs->hdr.lpwhparent;
SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0); SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0);
if (FTP_SendStore(lpwfs, lpszNewRemoteFile, dwFlags)) if (FTP_SendStore(lpwfs, lpszNewRemoteFile, dwFlags))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment