summaryrefslogtreecommitdiffhomepage
path: root/common-session.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-11-01 00:19:25 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-11-01 00:19:25 +0800
commit35f26ff8555c0accbc5b48df0fceebab3a71c54b (patch)
tree7de6c381ae3c68e5803bb62e535136b9f56247cf /common-session.c
parent3d733a16e9ee856a45a1fbd9a1b48005d78063f9 (diff)
parent55e7f0486a15b08122fffb22e38c71be15ef2986 (diff)
merge again
Diffstat (limited to 'common-session.c')
-rw-r--r--common-session.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/common-session.c b/common-session.c
index 9df0f3d..470d1f6 100644
--- a/common-session.c
+++ b/common-session.c
@@ -101,7 +101,7 @@ void common_session_init(int sock_in, int sock_out) {
ses.keys->recv.algo_mac = &dropbear_nohash;
ses.keys->trans.algo_mac = &dropbear_nohash;
- ses.keys->algo_kex = -1;
+ ses.keys->algo_kex = NULL;
ses.keys->algo_hostkey = -1;
ses.keys->recv.algo_comp = DROPBEAR_COMP_NONE;
ses.keys->trans.algo_comp = DROPBEAR_COMP_NONE;
@@ -245,7 +245,16 @@ void session_cleanup() {
ses.extra_session_cleanup();
}
- m_free(ses.session_id);
+ if (ses.session_id) {
+ buf_burn(ses.session_id);
+ buf_free(ses.session_id);
+ ses.session_id = NULL;
+ }
+ if (ses.hash) {
+ buf_burn(ses.hash);
+ buf_free(ses.hash);
+ ses.hash = NULL;
+ }
m_burn(ses.keys, sizeof(struct key_context));
m_free(ses.keys);