diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-04-14 21:14:32 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-04-14 21:14:32 +0200 |
commit | 6ffd38d25ecdfaf8e1a93dd3ee281e63d67ec139 (patch) | |
tree | bc0d6428430218f134e60d538dfc2744157b8120 /libssh/client.c | |
parent | 250273cf1aa5d8391aeb68ac11b55a067cab1969 (diff) | |
download | libssh-6ffd38d25ecdfaf8e1a93dd3ee281e63d67ec139.tar.gz libssh-6ffd38d25ecdfaf8e1a93dd3ee281e63d67ec139.tar.xz libssh-6ffd38d25ecdfaf8e1a93dd3ee281e63d67ec139.zip |
Fix doublefree happening after a negociation error
Fix the cherry-pick merge
Conflicts:
libssh/client.c
Diffstat (limited to 'libssh/client.c')
-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 75a0f67..d8ff685 100644 --- a/libssh/client.c +++ b/libssh/client.c @@ -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); |