aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-06-05 10:43:08 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-06-05 10:43:08 +0200
commitc4dbe3b863e0a0e63de16e2b215f3f22ea6ae730 (patch)
tree4a715956d6bcd29a1c749ff28afc5ce184955468
parent669678119c6cc565ff98786f3f0f92bad38e4c8d (diff)
downloadlibssh-c4dbe3b863e0a0e63de16e2b215f3f22ea6ae730.tar.gz
libssh-c4dbe3b863e0a0e63de16e2b215f3f22ea6ae730.tar.xz
libssh-c4dbe3b863e0a0e63de16e2b215f3f22ea6ae730.zip
knownhosts: Fix a memory leak on error
CID 1391446 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/knownhosts.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/knownhosts.c b/src/knownhosts.c
index f9aa1588..2f13f73f 100644
--- a/src/knownhosts.c
+++ b/src/knownhosts.c
@@ -462,6 +462,7 @@ enum ssh_known_hosts_e ssh_session_has_known_hosts_entry(ssh_session session)
}
if (ssh_list_count(entry_list) == 0) {
+ ssh_list_free(entry_list);
return SSH_KNOWN_HOSTS_NOT_FOUND;
}