]> granicus.if.org Git - python/commitdiff
Make sure we close the group and password databases when we are done with
authorFred Drake <fdrake@acm.org>
Sun, 11 Mar 2001 03:03:07 +0000 (03:03 +0000)
committerFred Drake <fdrake@acm.org>
Sun, 11 Mar 2001 03:03:07 +0000 (03:03 +0000)
them; this closes SF bug #407504.

Modules/grpmodule.c
Modules/pwdmodule.c

index 41a5ec975735c61883215ece711874db59ac1404..5dbcf9862bc8f49f2b52fceb420693f6d37826be 100644 (file)
@@ -87,6 +87,7 @@ grp_getgrall(PyObject *self, PyObject *args)
         }
         Py_DECREF(v);
     }
+    endgrent();
     return d;
 }
 
index 290dc45145592ba2dc003c24e47d362e29e39cbb..4c1b7db87892cf57044b40de3e0fbbb0a70fdd88 100644 (file)
@@ -102,6 +102,7 @@ pwd_getpwall(PyObject *self, PyObject *args)
                }
                Py_DECREF(v);
        }
+       endpwent();
        return d;
 }
 #endif