diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-04-14 20:56:22 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-04-14 20:56:22 +0200 |
commit | e5c2af631697d074bcea3f8a7393267b32673bef (patch) | |
tree | e85600d00ffea9f134277e695ac856ac9fd581ab | |
parent | 08a1bebb5887834fe55e65a2427b25c7a6563083 (diff) | |
download | libssh-e5c2af631697d074bcea3f8a7393267b32673bef.tar.gz libssh-e5c2af631697d074bcea3f8a7393267b32673bef.tar.xz libssh-e5c2af631697d074bcea3f8a7393267b32673bef.zip |
Fix doublefree happening after a negociation error
-rw-r--r-- | libssh/client.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libssh/client.c b/libssh/client.c index 4c4f6493..43081726 100644 --- a/libssh/client.c +++ b/libssh/client.c @@ -296,6 +296,7 @@ static int dh_handshake(ssh_session session) { 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"); rc = SSH_ERROR; @@ -400,10 +401,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); |