From: Hirokazu Yamamoto Date: Tue, 7 Dec 2010 10:24:37 +0000 (+0000) Subject: Issue #10637: Called CloseHandle twice in os.stat/os.lstat (Windows) X-Git-Tag: v3.2b2~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ed117addf090ac6423cf9e922204b9ac54fe619;p=thirdparty%2FPython%2Fcpython.git Issue #10637: Called CloseHandle twice in os.stat/os.lstat (Windows) --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 01da01df280c..6f13776cce05 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1159,8 +1159,8 @@ win32_xstat_impl(const char *path, struct win32_stat *result, BOOL traverse, int free(target_path); return code; } - } - CloseHandle(hFile); + } else + CloseHandle(hFile); } attribute_data_to_stat(&info, reparse_tag, result); @@ -1232,8 +1232,8 @@ win32_xstat_impl_w(const wchar_t *path, struct win32_stat *result, BOOL traverse free(target_path); return code; } - } - CloseHandle(hFile); + } else + CloseHandle(hFile); } attribute_data_to_stat(&info, reparse_tag, result);