scrrun: Close find handle on error (Coverity).

This commit is contained in:
Nikolay Sivov 2014-03-25 08:00:39 +04:00 committed by Alexandre Julliard
parent 4768ac4413
commit 293bae153d
1 changed files with 3 additions and 1 deletions

View File

@ -3189,8 +3189,10 @@ static inline HRESULT copy_file(const WCHAR *source, DWORD source_len,
return CTL_E_FILENOTFOUND;
src_len = get_parent_folder_name(source, source_len);
if(src_len+1 >= MAX_PATH)
if(src_len+1 >= MAX_PATH) {
FindClose(f);
return E_FAIL;
}
if(src_len) {
memcpy(src_path, source, src_len*sizeof(WCHAR));
src_path[src_len++] = '\\';