[Python-checkins] r73428 - in python/branches/release30-maint: Misc/NEWS Modules/mmapmodule.c
hirokazu.yamamoto
python-checkins at python.org
Sun Jun 14 07:16:36 CEST 2009
Author: hirokazu.yamamoto
Date: Sun Jun 14 07:16:35 2009
New Revision: 73428
Log:
Merged revisions 73427 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r73427 | hirokazu.yamamoto | 2009-06-14 13:58:16 +0900 | 10 lines
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/release30-maint/ (props changed)
python/branches/release30-maint/Misc/NEWS
python/branches/release30-maint/Modules/mmapmodule.c
Modified: python/branches/release30-maint/Misc/NEWS
==============================================================================
--- python/branches/release30-maint/Misc/NEWS (original)
+++ python/branches/release30-maint/Misc/NEWS Sun Jun 14 07:16:35 2009
@@ -73,6 +73,9 @@
Library
-------
+- Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
+ (On Unix)
+
- Issue #6258: Support AMD64 in bdist_msi.
- Fix a bug in the trace module where a bytes object from co_lnotab had its
Modified: python/branches/release30-maint/Modules/mmapmodule.c
==============================================================================
--- python/branches/release30-maint/Modules/mmapmodule.c (original)
+++ python/branches/release30-maint/Modules/mmapmodule.c Sun Jun 14 07:16:35 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