Skip to content

Commit 8e68eb6

Browse files
committed
Make sure we close the group and password databases when we are done with
them; this closes SF bug #407504.
1 parent 401396f commit 8e68eb6

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/grpmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ grp_getgrall(PyObject *self, PyObject *args)
8787
}
8888
Py_DECREF(v);
8989
}
90+
endgrent();
9091
return d;
9192
}
9293

Modules/pwdmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ pwd_getpwall(PyObject *self, PyObject *args)
102102
}
103103
Py_DECREF(v);
104104
}
105+
endpwent();
105106
return d;
106107
}
107108
#endif

0 commit comments

Comments
 (0)