Mercurial > dropbear
comparison common-session.c @ 891:e78f5ce6e7bb
cleanup before clearing keys
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 12 Feb 2014 22:15:02 +0800 |
parents | cbc73a5aefb0 |
children | a1a97e98b0c1 |
comparison
equal
deleted
inserted
replaced
890:d50c17fe57d7 | 891:e78f5ce6e7bb |
---|---|
242 } | 242 } |
243 | 243 |
244 if (ses.extra_session_cleanup) { | 244 if (ses.extra_session_cleanup) { |
245 ses.extra_session_cleanup(); | 245 ses.extra_session_cleanup(); |
246 } | 246 } |
247 | 247 |
248 chancleanup(); | |
249 | |
250 /* Cleaning up keys must happen after other cleanup | |
251 functions which might queue packets */ | |
248 if (ses.session_id) { | 252 if (ses.session_id) { |
249 buf_burn(ses.session_id); | 253 buf_burn(ses.session_id); |
250 buf_free(ses.session_id); | 254 buf_free(ses.session_id); |
251 ses.session_id = NULL; | 255 ses.session_id = NULL; |
252 } | 256 } |
255 buf_free(ses.hash); | 259 buf_free(ses.hash); |
256 ses.hash = NULL; | 260 ses.hash = NULL; |
257 } | 261 } |
258 m_burn(ses.keys, sizeof(struct key_context)); | 262 m_burn(ses.keys, sizeof(struct key_context)); |
259 m_free(ses.keys); | 263 m_free(ses.keys); |
260 | |
261 chancleanup(); | |
262 | 264 |
263 TRACE(("leave session_cleanup")) | 265 TRACE(("leave session_cleanup")) |
264 } | 266 } |
265 | 267 |
266 void send_session_identification() { | 268 void send_session_identification() { |