commit | 4f16d3b4ac92c93b2d8297cf62b1820603b67b55 | [log] [tgz] |
---|---|---|
author | Martin v. Löwis <martin@v.loewis.de> | Fri May 29 15:58:08 2009 +0000 |
committer | Martin v. Löwis <martin@v.loewis.de> | Fri May 29 15:58:08 2009 +0000 |
tree | 1f93327ab0944eaf51710bfe7c3d3bf208f011fe | |
parent | 3e3eace7d75b748254589b76970367588d320199 [diff] [blame] |
Issue #4873: Fix resource leaks in error cases of pwd and grp.
diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c index e5b9f47..ffb451e 100644 --- a/Modules/grpmodule.c +++ b/Modules/grpmodule.c
@@ -76,7 +76,6 @@ if (PyErr_Occurred()) { Py_DECREF(v); - Py_DECREF(w); return NULL; } @@ -139,6 +138,7 @@ if (v == NULL || PyList_Append(d, v) != 0) { Py_XDECREF(v); Py_DECREF(d); + endgrent(); return NULL; } Py_DECREF(v);