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

This commit is contained in:
Neal Norwitz 2005-11-02 05:26:07 +00:00
parent 245a5ab31b
commit 7b631793ab
2 changed files with 3 additions and 0 deletions

View File

@ -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.

View File

@ -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);