known_hosts: Do not leak pubkey_buffer in check_public_key()

CID: 1388447

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-04-18 10:29:21 +02:00
parent 64985f7bea
commit c2f8010b60

View File

@@ -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;
}