[Python-checkins] r87117 - python/branches/py3k/Modules/posixmodule.c

hirokazu.yamamoto python-checkins at python.org
Tue Dec 7 11:24:37 CET 2010


Author: hirokazu.yamamoto
Date: Tue Dec  7 11:24:37 2010
New Revision: 87117

Log:
Issue #10637: Called CloseHandle twice in os.stat/os.lstat (Windows)


Modified:
   python/branches/py3k/Modules/posixmodule.c

Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c	(original)
+++ python/branches/py3k/Modules/posixmodule.c	Tue Dec  7 11:24:37 2010
@@ -1159,8 +1159,8 @@
                 free(target_path);
                 return code;
             }
-        }
-        CloseHandle(hFile);
+        } else
+            CloseHandle(hFile);
     }
     attribute_data_to_stat(&info, reparse_tag, result);
 
@@ -1232,8 +1232,8 @@
                 free(target_path);
                 return code;
             }
-        }
-        CloseHandle(hFile);
+        } else
+            CloseHandle(hFile);
     }
     attribute_data_to_stat(&info, reparse_tag, result);
 


More information about the Python-checkins mailing list