mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
Fix doublefree happening after a negociation error
Fix the cherry-pick merge Conflicts: libssh/client.c
This commit is contained in:
@@ -287,6 +287,7 @@ SSH_PACKET_CALLBACK(ssh_packet_dh_reply){
|
||||
goto error;
|
||||
}
|
||||
session->dh_server_signature = signature;
|
||||
signature=NULL; /* ownership changed */
|
||||
if (dh_build_k(session) < 0) {
|
||||
ssh_set_error(session, SSH_FATAL, "Cannot build k number");
|
||||
goto error;
|
||||
@@ -453,10 +454,6 @@ error:
|
||||
string_burn(f);
|
||||
string_free(f);
|
||||
}
|
||||
if(pubkey != NULL){
|
||||
string_burn(pubkey);
|
||||
string_free(pubkey);
|
||||
}
|
||||
if(signature != NULL){
|
||||
string_burn(signature);
|
||||
string_free(signature);
|
||||
|
Reference in New Issue
Block a user