Another fix for another crash relating to misuse of FSM and callback logic in
the SKE library.
void *destructor_context)
{
SilcSKE ske = fsm_context;
+ ske->fsm_finished = TRUE;
silc_ske_free(ske);
}
silc_ske_notify_failure(ske);
- silc_fsm_continue_sync(&ske->fsm);
+ if (!ske->fsm_finished)
+ silc_fsm_continue_sync(&ske->fsm);
+ else
+ SILC_LOG_DEBUG(("Not continuing FSM as it's finished for SKE %p", ske));
}
ske->refcnt--;
unsigned int responder : 1; /* Set when we are responder side */
unsigned int rekeying : 1; /* Set when rekeying */
unsigned int failure_notified : 1; /* Set to indicate that we already called the failure notify routine */
+ unsigned int fsm_finished : 1; /* Set when we're in FSM teardown */
};
#endif /* SILCSKE_I_H */