diff options
author | Matt Johnston <matt@ucc.asn.au> | 2014-02-12 22:15:02 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2014-02-12 22:15:02 +0800 |
commit | a18a6b8db8e86f0870dfd59c84fa286436f79e5c (patch) | |
tree | efa46f1eebd51763f197b7f022858cbd77295f16 /common-session.c | |
parent | bf56591fb8f3010ccdaa7417d7d3b6c625c07060 (diff) |
cleanup before clearing keys
Diffstat (limited to 'common-session.c')
-rw-r--r-- | common-session.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common-session.c b/common-session.c index 40c66e8..6882dce 100644 --- a/common-session.c +++ b/common-session.c @@ -244,7 +244,11 @@ void session_cleanup() { if (ses.extra_session_cleanup) { ses.extra_session_cleanup(); } + + chancleanup(); + /* Cleaning up keys must happen after other cleanup + functions which might queue packets */ if (ses.session_id) { buf_burn(ses.session_id); buf_free(ses.session_id); @@ -258,8 +262,6 @@ void session_cleanup() { m_burn(ses.keys, sizeof(struct key_context)); m_free(ses.keys); - chancleanup(); - TRACE(("leave session_cleanup")) } |