Commit 3d8827da authored by Hirokazu Yamamoto's avatar Hirokazu Yamamoto

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.
........
parent 077da0e6
......@@ -15,6 +15,9 @@ Core and Builtins
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?
=============================================
......
......@@ -164,7 +164,8 @@ mmap_close_method(mmap_object *self, PyObject *unused)
#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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment