[Python-checkins] r73427 - in python/branches/py3k: Misc/NEWS Modules/mmapmodule.c
hirokazu.yamamoto
python-checkins at python.org
Sun Jun 14 06:58:16 CEST 2009
Author: hirokazu.yamamoto
Date: Sun Jun 14 06:58:16 2009
New Revision: 73427
Log:
Merged revisions 73425 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73425 | hirokazu.yamamoto | 2009-06-14 12:53:55 +0900 | 2 lines
Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
(On Unix) Patch by STINNER Victor.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Misc/NEWS
python/branches/py3k/Modules/mmapmodule.c
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sun Jun 14 06:58:16 2009
@@ -15,6 +15,9 @@
Library
-------
+- Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
+ (On Unix)
+
What's New in Python 3.1 Release Candidate 2?
=============================================
Modified: python/branches/py3k/Modules/mmapmodule.c
==============================================================================
--- python/branches/py3k/Modules/mmapmodule.c (original)
+++ python/branches/py3k/Modules/mmapmodule.c Sun Jun 14 06:58:16 2009
@@ -164,7 +164,8 @@
#endif /* MS_WINDOWS */
#ifdef UNIX
- (void) close(self->fd);
+ if (0 <= self->fd)
+ (void) close(self->fd);
self->fd = -1;
if (self->data != NULL) {
munmap(self->data, self->size);
More information about the Python-checkins
mailing list