=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/passwd/pwd_check.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- src/usr.bin/passwd/pwd_check.c 2021/08/28 06:46:49 1.17 +++ src/usr.bin/passwd/pwd_check.c 2023/05/08 16:11:41 1.18 @@ -1,4 +1,4 @@ -/* $OpenBSD: pwd_check.c,v 1.17 2021/08/28 06:46:49 robert Exp $ */ +/* $OpenBSD: pwd_check.c,v 1.18 2023/05/08 16:11:41 tobias Exp $ */ /* * Copyright 2000 Niels Provos @@ -114,6 +114,8 @@ switch (child = fork()) { case -1: warn("fork"); + close(pipefds[0]); + close(pipefds[1]); goto out; case 0: (void)signal(SIGINT, SIG_DFL); @@ -184,8 +186,10 @@ /* get the return value from the child */ while (waitpid(child, &res, 0) == -1) { - if (errno != EINTR) - break; + if (errno != EINTR) { + warn("waitpid"); + goto out; + } } if (WIFEXITED(res) && WEXITSTATUS(res) == 0) { free(checker);