From: Fred Drake Date: Sun, 11 Mar 2001 03:03:07 +0000 (+0000) Subject: Make sure we close the group and password databases when we are done with X-Git-Tag: v2.1b2~189 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e68eb61f25deafc3c3b3beb814e5deadd05a496;p=thirdparty%2FPython%2Fcpython.git Make sure we close the group and password databases when we are done with them; this closes SF bug #407504. --- 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