From 81c7b62ec0ea0f7065b74b82a05a8cd14e10c41f Mon Sep 17 00:00:00 2001 From: Moshe Zadka Date: Fri, 30 Mar 2001 19:18:23 +0000 Subject: [PATCH] Fixing bug #407504. -- did not close pwd/grp databases. --- Misc/NEWS | 4 ++++ Modules/grpmodule.c | 1 + Modules/pwdmodule.c | 1 + 3 files changed, 6 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index c20900f825c0..25638538893b 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -41,6 +41,10 @@ http://sourceforge.net/tracker/index.php?func=detail&aid=&group_id=5470&atid - complex() could segfault on numeric types with NULL for float conversion. Fixed. +- Fixed #407504 -- closing pwd and grp database when finished. + +- Fixed memory leak in from import ... + What's New in Python 2.0? ========================= diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c index 41a5ec975735..5dbcf9862bc8 100644 --- a/Modules/grpmodule.c +++ b/Modules/grpmodule.c @@ -87,6 +87,7 @@ grp_getgrall(PyObject *self, PyObject *args) } Py_DECREF(v); } + endgrent(); return d; } diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index 290dc4514559..4c1b7db87892 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -102,6 +102,7 @@ pwd_getpwall(PyObject *self, PyObject *args) } Py_DECREF(v); } + endpwent(); return d; } #endif -- 2.47.3