summaryrefslogtreecommitdiff
path: root/src/pwd/endpwent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pwd/endpwent.c')
-rw-r--r--src/pwd/endpwent.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pwd/endpwent.c b/src/pwd/endpwent.c
index 73f2139c..df6af455 100644
--- a/src/pwd/endpwent.c
+++ b/src/pwd/endpwent.c
@@ -1,7 +1,13 @@
#include <pwd.h>
+#include "_pwd.h"
+#include "stdio.h"
void endpwent(void)
{
+ if (__pwd.db != NULL) {
+ fclose(__pwd.db);
+ __pwd.db = NULL;
+ }
}
/*