# HG changeset patch # User Matt Johnston # Date 1392214502 -28800 # Node ID e78f5ce6e7bb77321177f4eb1b634fc8c7132240 # Parent d50c17fe57d77da37744911a9bd18d9f3fede45b cleanup before clearing keys diff -r d50c17fe57d7 -r e78f5ce6e7bb common-session.c --- a/common-session.c Fri Feb 07 07:57:45 2014 +0800 +++ b/common-session.c Wed Feb 12 22:15:02 2014 +0800 @@ -244,7 +244,11 @@ 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 @@ m_burn(ses.keys, sizeof(struct key_context)); m_free(ses.keys); - chancleanup(); - TRACE(("leave session_cleanup")) }