From 7b631793abc97edbcd26af56864961e264a86a24 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 2 Nov 2005 05:26:07 +0000 Subject: Bug #1344508, Fix UNIX mmap leaking file descriptors. Will backport. --- Misc/NEWS | 2 ++ Modules/mmapmodule.c | 1 + 2 files changed, 3 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index e88311f..9b3f381 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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. 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); -- cgit v0.12