mirror of https://github.com/python/cpython
Make sure we close the group and password databases when we are done with
them; this closes SF bug #407504.
This commit is contained in:
parent
401396fc60
commit
8e68eb61f2
|
@ -87,6 +87,7 @@ grp_getgrall(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
Py_DECREF(v);
|
Py_DECREF(v);
|
||||||
}
|
}
|
||||||
|
endgrent();
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,7 @@ pwd_getpwall(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
Py_DECREF(v);
|
Py_DECREF(v);
|
||||||
}
|
}
|
||||||
|
endpwent();
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue