[openssh-commits] [openssh] 01/01: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jun 30 16:07:59 AEST 2017


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit d79bceb9311a9c137d268f5bc481705db4151810
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Jun 30 04:17:23 2017 +0000

    upstream commit
    
    Only call close once in confree().  ssh_packet_close will
    close the FD so only explicitly close non-SSH channels.  bz#2734, from
    bagajjal at microsoft.com, ok djm@
    
    Upstream-ID: a81ce0c8b023527167739fccf1732b154718ab02
---
 ssh-keyscan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 2767e7d5..258123ae 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.114 2017/05/31 07:00:13 markus Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.115 2017/06/30 04:17:23 dtucker Exp $ */
 /*
  * Copyright 1995, 1996 by David Mazieres <dm at lcs.mit.edu>.
  *
@@ -390,7 +390,6 @@ confree(int s)
 {
 	if (s >= maxfd || fdcon[s].c_status == CS_UNUSED)
 		fatal("confree: attempt to free bad fdno %d", s);
-	close(s);
 	free(fdcon[s].c_namebase);
 	free(fdcon[s].c_output_name);
 	if (fdcon[s].c_status == CS_KEYS)
@@ -401,7 +400,8 @@ confree(int s)
 		ssh_packet_close(fdcon[s].c_ssh);
 		free(fdcon[s].c_ssh);
 		fdcon[s].c_ssh = NULL;
-	}
+	} else
+		close(s);
 	TAILQ_REMOVE(&tq, &fdcon[s], c_link);
 	FD_CLR(s, read_wait);
 	ncon--;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list