mirror of
https://github.com/python/cpython.git
synced 2026-01-23 15:48:53 +00:00
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. ........
This commit is contained in:
parent
1cfa3926f9
commit
86c8efc3bb
2 changed files with 5 additions and 1 deletions
|
|
@ -56,6 +56,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
|
||||
(On Unix)
|
||||
|
||||
- Issue #6258: Support AMD64 in bdist_msi.
|
||||
|
||||
- Issue #5262: Fixed bug in next rollover time computation in
|
||||
|
|
|
|||
|
|
@ -158,7 +158,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue