summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2015-03-31 22:55:50 +0000
committerdjm <djm@openbsd.org>2015-03-31 22:55:50 +0000
commitcda3d60a9047190bbe513325e905cab472b626ce (patch)
treef71655de372b5f162b861a6c26060615f8a27b49
parentdon't fatal when a !ssh1 sshd is reexeced from a w/ssh1 listener; (diff)
downloadwireguard-openbsd-cda3d60a9047190bbe513325e905cab472b626ce.tar.xz
wireguard-openbsd-cda3d60a9047190bbe513325e905cab472b626ce.zip
fd leak for !ssh1 case; found by unittests; ok markus@
-rw-r--r--usr.bin/ssh/authfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c
index cad372d516b..ee84196168b 100644
--- a/usr.bin/ssh/authfile.c
+++ b/usr.bin/ssh/authfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authfile.c,v 1.112 2015/03/18 01:44:21 djm Exp $ */
+/* $OpenBSD: authfile.c,v 1.113 2015/03/31 22:55:50 djm Exp $ */
/*
* Copyright (c) 2000, 2013 Markus Friedl. All rights reserved.
*
@@ -354,6 +354,8 @@ sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp)
case 0:
return r;
}
+#else /* WITH_SSH1 */
+ close(fd);
#endif /* WITH_SSH1 */
/* try ssh2 public key */