]> git.armaanb.net Git - opendoas.git/blobdiff - pam.c
pam: close timestamp fd in both both processes
[opendoas.git] / pam.c
diff --git a/pam.c b/pam.c
index e0f17a536012b6bca3bccad1f2a74a2f0458326c..c5a3001509b59364281466cca310d56ce523b990 100644 (file)
--- 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) {