aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-04-18 10:29:21 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-04-18 10:29:21 +0200
commitc2f8010b6003a218398943548b7c2ddc91d36ab8 (patch)
tree8b145ad17cfa5e30d53a674f84fa8da03552f147
parent64985f7beac732aad839c9a0bb53d143c0ab5639 (diff)
downloadlibssh-c2f8010b6003a218398943548b7c2ddc91d36ab8.tar.gz
libssh-c2f8010b6003a218398943548b7c2ddc91d36ab8.tar.xz
libssh-c2f8010b6003a218398943548b7c2ddc91d36ab8.zip
known_hosts: Do not leak pubkey_buffer in check_public_key()
CID: 1388447 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/known_hosts.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/known_hosts.c b/src/known_hosts.c
index d89aca19..2b07b39d 100644
--- a/src/known_hosts.c
+++ b/src/known_hosts.c
@@ -274,6 +274,7 @@ static int check_public_key(ssh_session session, char **tokens) {
rc = ssh_dh_get_current_server_publickey_blob(session, &pubkey_blob);
if (rc != 0) {
+ ssh_buffer_free(pubkey_buffer);
return -1;
}