summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sshconnect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 96b91ce1a..948b638ad 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.272 2016/09/12 01:22:38 deraadt Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.273 2017/03/10 03:22:40 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1532,6 +1532,7 @@ maybe_add_key_to_agent(char *authfile, Key *private, char *comment,
1532 if (options.add_keys_to_agent == 2 && 1532 if (options.add_keys_to_agent == 2 &&
1533 !ask_permission("Add key %s (%s) to agent?", authfile, comment)) { 1533 !ask_permission("Add key %s (%s) to agent?", authfile, comment)) {
1534 debug3("user denied adding this key"); 1534 debug3("user denied adding this key");
1535 close(auth_sock);
1535 return; 1536 return;
1536 } 1537 }
1537 1538
@@ -1540,4 +1541,5 @@ maybe_add_key_to_agent(char *authfile, Key *private, char *comment,
1540 debug("identity added to agent: %s", authfile); 1541 debug("identity added to agent: %s", authfile);
1541 else 1542 else
1542 debug("could not add identity to agent: %s (%d)", authfile, r); 1543 debug("could not add identity to agent: %s (%d)", authfile, r);
1544 close(auth_sock);
1543} 1545}