mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
ecdh: Fix a memory leak in ssh_server_ecdh_init().
Thanks to Tom Judge for the report.
This commit is contained in:
@@ -239,6 +239,7 @@ int ssh_server_ecdh_init(ssh_session session, ssh_buffer packet){
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
buffer_add_ssh_string(session->out_buffer, sig_blob);
|
buffer_add_ssh_string(session->out_buffer, sig_blob);
|
||||||
|
ssh_string_free(sig_blob);
|
||||||
/* Free private keys as they should not be readable after this point */
|
/* Free private keys as they should not be readable after this point */
|
||||||
if (session->srv.rsa_key) {
|
if (session->srv.rsa_key) {
|
||||||
ssh_key_free(session->srv.rsa_key);
|
ssh_key_free(session->srv.rsa_key);
|
||||||
|
|||||||
Reference in New Issue
Block a user