diff --git a/res/res_calendar.c b/res/res_calendar.c index e4184254d2..17b005c659 100644 --- a/res/res_calendar.c +++ b/res/res_calendar.c @@ -1827,6 +1827,8 @@ static int unload_module(void) ast_mutex_unlock(&refreshlock); pthread_join(refresh_thread, NULL); + ast_sched_context_destroy(sched); + AST_LIST_LOCK(&techs); AST_LIST_TRAVERSE_SAFE_BEGIN(&techs, tech, list) { ast_unload_resource(tech->module, 0);