You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openssh/SOURCES/openssh-8.0p1-avoidkillall....

21 lines
377 B

diff --git a/sftp.c b/sftp.c
index b66037f1..54538ff9 100644
--- a/sftp.c
+++ b/sftp.c
@@ -220,9 +220,12 @@ static const struct CMD cmds[] = {
static void
killchild(int signo)
{
- if (sshpid > 1) {
- kill(sshpid, SIGTERM);
- waitpid(sshpid, NULL, 0);
+ pid_t pid;
+
+ pid = sshpid;
+ if (pid > 1) {
+ kill(pid, SIGTERM);
+ (void)waitpid(pid, NULL, 0);
}
_exit(1);