Make sure we close the group and password databases when we are done with
them; this closes SF bug #407504.
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index 290dc45..4c1b7db 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -102,6 +102,7 @@
 		}
 		Py_DECREF(v);
 	}
+	endpwent();
 	return d;
 }
 #endif