diff options
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")) } |