mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 11:10:28 +09:00
ecdh_crypto: Avoid memory leak on error condition
CID 1034574 Thanks coverity Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -215,6 +215,7 @@ int ssh_client_ecdh_init(ssh_session session)
|
|||||||
|
|
||||||
rc = ssh_buffer_add_ssh_string(session->out_buffer, client_pubkey);
|
rc = ssh_buffer_add_ssh_string(session->out_buffer, client_pubkey);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
|
ssh_string_free(client_pubkey);
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user