summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-11-02 05:26:07 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-11-02 05:26:07 (GMT)
commit7b631793abc97edbcd26af56864961e264a86a24 (patch)
tree78b974c54962420022a048f280d865c0abb71095 /Modules
parent245a5ab31bbaa48776736bdd101b0df7164125c9 (diff)
downloadcpython-7b631793abc97edbcd26af56864961e264a86a24.zip
cpython-7b631793abc97edbcd26af56864961e264a86a24.tar.gz
cpython-7b631793abc97edbcd26af56864961e264a86a24.tar.bz2
Bug #1344508, Fix UNIX mmap leaking file descriptors. Will backport.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/mmapmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index dd7c16f..73797cb 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -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);