aboutsummaryrefslogtreecommitdiff
path: root/src/wrapper.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2012-12-23 23:09:50 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2012-12-23 23:09:50 +0100
commit63c3f0e7368c7286a960c65422513850ce192124 (patch)
tree2267e176dac25d4c9e14512282a4723d94a063d6 /src/wrapper.c
parente934ab0816e871253cd3d0538638f0b7cf98c375 (diff)
downloadlibssh-63c3f0e7368c7286a960c65422513850ce192124.tar.gz
libssh-63c3f0e7368c7286a960c65422513850ce192124.tar.xz
libssh-63c3f0e7368c7286a960c65422513850ce192124.zip
Implement key re-exchange
Diffstat (limited to 'src/wrapper.c')
-rw-r--r--src/wrapper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wrapper.c b/src/wrapper.c
index e27579db..b8a489d4 100644
--- a/src/wrapper.c
+++ b/src/wrapper.c
@@ -121,7 +121,10 @@ void crypto_free(struct ssh_crypto_struct *crypto){
memset(crypto->session_id, '\0', crypto->digest_len);
SAFE_FREE(crypto->session_id);
}
-
+ if(crypto->secret_hash != NULL){
+ memset(crypto->secret_hash, '\0', crypto->digest_len);
+ SAFE_FREE(crypto->secret_hash);
+ }
#ifdef WITH_ZLIB
if (crypto->compress_out_ctx &&
(deflateEnd(crypto->compress_out_ctx) != 0)) {