aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pam.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pam.c b/pam.c
index e0f17a5..c5a3001 100644
--- a/pam.c
+++ b/pam.c
@@ -323,8 +323,13 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p
}
/* return as child */
- if (child == 0)
+ if (child == 0) {
+#ifdef USE_TIMESTAMP
+ if (fd != -1)
+ close(fd);
+#endif
return;
+ }
#ifdef USE_TIMESTAMP
if (fd != -1) {