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