Nikolay Sivov : scrrun: Close find handle on error (Coverity).
Alexandre Julliard
julliard at winehq.org
Tue Mar 25 14:27:43 CDT 2014
Module: wine
Branch: master
Commit: 293bae153d4c092cc74e7fb5f19290ce7aa160da
URL: http://source.winehq.org/git/wine.git/?a=commit;h=293bae153d4c092cc74e7fb5f19290ce7aa160da
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Mar 25 08:00:39 2014 +0400
scrrun: Close find handle on error (Coverity).
---
dlls/scrrun/filesystem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index ec4890a..f4c1997 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -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++] = '\\';
More information about the wine-cvs
mailing list