diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2009-05-29 15:58:08 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2009-05-29 15:58:08 +0000 |
commit | 4f16d3b4ac92c93b2d8297cf62b1820603b67b55 (patch) | |
tree | 1f93327ab0944eaf51710bfe7c3d3bf208f011fe /Modules/pwdmodule.c | |
parent | 3e3eace7d75b748254589b76970367588d320199 (diff) | |
download | cpython-git-4f16d3b4ac92c93b2d8297cf62b1820603b67b55.tar.gz |
Issue #4873: Fix resource leaks in error cases of pwd and grp.
Diffstat (limited to 'Modules/pwdmodule.c')
-rw-r--r-- | Modules/pwdmodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index 9e01f48757..a271c5a82e 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -160,6 +160,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); |