summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-03-11 03:03:07 (GMT)
committerFred Drake <fdrake@acm.org>2001-03-11 03:03:07 (GMT)
commit8e68eb61f25deafc3c3b3beb814e5deadd05a496 (patch)
tree0ad72f7ab5b9fca17d5a1516ef2c70f3f78a4c36
parent401396fc60fd28bf7166020f03f8c6223ca99d3a (diff)
downloadcpython-8e68eb61f25deafc3c3b3beb814e5deadd05a496.zip
cpython-8e68eb61f25deafc3c3b3beb814e5deadd05a496.tar.gz
cpython-8e68eb61f25deafc3c3b3beb814e5deadd05a496.tar.bz2
Make sure we close the group and password databases when we are done with
them; this closes SF bug #407504.
-rw-r--r--Modules/grpmodule.c1
-rw-r--r--Modules/pwdmodule.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c
index 41a5ec9..5dbcf98 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 290dc45..4c1b7db 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