Commit 7b631793 authored by Neal Norwitz's avatar Neal Norwitz

Bug #1344508, Fix UNIX mmap leaking file descriptors. Will backport.

parent 245a5ab3
...@@ -177,6 +177,8 @@ Core and builtins ...@@ -177,6 +177,8 @@ Core and builtins
Extension Modules Extension Modules
----------------- -----------------
- Bug #1344508, Fix UNIX mmap leaking file descriptors
- Patch #1338314, Bug #1336623: fix tarfile so it can extract - Patch #1338314, Bug #1336623: fix tarfile so it can extract
REGTYPE directories from tarfiles written by old programs. REGTYPE directories from tarfiles written by old programs.
......
...@@ -99,6 +99,7 @@ mmap_object_dealloc(mmap_object *m_obj) ...@@ -99,6 +99,7 @@ mmap_object_dealloc(mmap_object *m_obj)
#endif /* MS_WINDOWS */ #endif /* MS_WINDOWS */
#ifdef UNIX #ifdef UNIX
close(m_obj->fd);
if (m_obj->data!=NULL) { if (m_obj->data!=NULL) {
msync(m_obj->data, m_obj->size, MS_SYNC); msync(m_obj->data, m_obj->size, MS_SYNC);
munmap(m_obj->data, m_obj->size); munmap(m_obj->data, m_obj->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