jcs's openbsd hax
openbsd

avoid uninitialised var use in an error path ok tb@

jsg a24a25a5 8eac1d8a

+5 -3
+5 -3
usr.bin/passwd/pwd_check.c
··· 1 - /* $OpenBSD: pwd_check.c,v 1.19 2024/05/24 13:32:03 op Exp $ */ 1 + /* $OpenBSD: pwd_check.c,v 1.20 2025/01/30 02:22:59 jsg Exp $ */ 2 2 3 3 /* 4 4 * Copyright 2000 Niels Provos <provos@citi.umich.edu> ··· 114 114 switch (child = fork()) { 115 115 case -1: 116 116 warn("fork"); 117 - close(pipefds[0]); 118 - close(pipefds[1]); 117 + if (checker != NULL) { 118 + close(pipefds[0]); 119 + close(pipefds[1]); 120 + } 119 121 goto out; 120 122 case 0: 121 123 (void)signal(SIGINT, SIG_DFL);