res_calendar: Cleanup scheduler context at unload.

ASTERISK-25679 #close

Change-Id: I839159bf6882cccc1b23494c7aa2bc2a2624613f
This commit is contained in:
Corey Farrell
2016-01-10 14:27:57 -05:00
parent 573b37c658
commit 1d3a1167fc

View File

@@ -1853,6 +1853,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);