summaryrefslogtreecommitdiffstats
path: root/Modules/pwdmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2009-05-29 16:01:34 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2009-05-29 16:01:34 (GMT)
commite23c8683a5e11307e4a3528826e0b84fa3fb5660 (patch)
treeaba54bc3c3ab191bd548e45160de84e8af81db74 /Modules/pwdmodule.c
parentb6a748b817205413ac75ccee5f9b4728b5ea3b2d (diff)
downloadcpython-e23c8683a5e11307e4a3528826e0b84fa3fb5660.zip
cpython-e23c8683a5e11307e4a3528826e0b84fa3fb5660.tar.gz
cpython-e23c8683a5e11307e4a3528826e0b84fa3fb5660.tar.bz2
Merged revisions 73016 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73016 | martin.v.loewis | 2009-05-29 17:58:08 +0200 (Fr, 29 Mai 2009) | 2 lines Issue #4873: Fix resource leaks in error cases of pwd and grp. ........
Diffstat (limited to 'Modules/pwdmodule.c')
-rw-r--r--Modules/pwdmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index 5802818..1547cdf 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -175,6 +175,7 @@ pwd_getpwall(PyObject *self)
if (v == NULL || PyList_Append(d, v) != 0) {
Py_XDECREF(v);
Py_DECREF(d);
+ endpwent();
return NULL;
}
Py_DECREF(v);