summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-03-31 22:55:50 +0000
committerDamien Miller <djm@mindrot.org>2015-04-01 10:00:46 +1100
commit9a47ab80030a31f2d122b8fd95bd48c408b9fcd9 (patch)
tree2c511e3822abd321531493eec2043d937b401191 /authfile.c
parentc9a0805a6280681901c270755a7cd630d7c5280e (diff)
downloadopenssh-git-9a47ab80030a31f2d122b8fd95bd48c408b9fcd9.tar.gz
upstream commit
fd leak for !ssh1 case; found by unittests; ok markus@
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/authfile.c b/authfile.c
index a6473c82..f955536d 100644
--- a/authfile.c
+++ b/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.
*
@@ -359,6 +359,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 */