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:
@@ -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,
|
rc = ssh_known_hosts_read_entries(host_port,
|
||||||
session->opts.knownhosts,
|
session->opts.knownhosts,
|
||||||
&entry_list);
|
&entry_list);
|
||||||
|
SAFE_FREE(host_port);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
return SSH_KNOWN_HOSTS_UNKNOWN;
|
return SSH_KNOWN_HOSTS_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user