1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

kownhosts: Fix a memory leak in ssh_session_has_known_hosts_entry()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-08-08 13:49:38 +02:00
parent 52b57077de
commit 96476f74af

View File

@@ -550,6 +550,7 @@ enum ssh_known_hosts_e ssh_session_has_known_hosts_entry(ssh_session session)
rc = ssh_known_hosts_read_entries(host_port,
session->opts.knownhosts,
&entry_list);
SAFE_FREE(host_port);
if (rc != 0) {
return SSH_KNOWN_HOSTS_UNKNOWN;
}