Kaydet (Commit) 7b631793 authored tarafından Neal Norwitz's avatar Neal Norwitz

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

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