Kaydet (Commit) 983a4654 authored tarafından Hirokazu Yamamoto's avatar Hirokazu Yamamoto

Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.

(On Unix) Patch by STINNER Victor.
üst e69041db
......@@ -325,6 +325,9 @@ Core and Builtins
Library
-------
- Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
(On Unix)
- Issue #6215: All bug fixes and enhancements from the Python 3.1 io library
(including the fast C implementation) have been backported to the standard
``io`` module.
......
......@@ -158,6 +158,7 @@ mmap_close_method(mmap_object *self, PyObject *unused)
#endif /* MS_WINDOWS */
#ifdef UNIX
if (0 <= self->fd)
(void) close(self->fd);
self->fd = -1;
if (self->data != NULL) {
......
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