mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
knownhosts: Fix a memory leak on error
CID 1391446 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user