From: Moshe Zadka Date: Fri, 30 Mar 2001 19:18:23 +0000 (+0000) Subject: Fixing bug #407504. -- did not close pwd/grp databases. X-Git-Tag: v2.0.1c1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81c7b62ec0ea0f7065b74b82a05a8cd14e10c41f;p=thirdparty%2FPython%2Fcpython.git Fixing bug #407504. -- did not close pwd/grp databases. --- 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