Index: res/res_calendar.c =================================================================== --- res/res_calendar.c (revision 391701) +++ res/res_calendar.c (working copy) @@ -1819,6 +1819,8 @@ /* Remove all calendars */ ao2_callback(calendars, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL); + ao2_cleanup(calendars); + calendars = NULL; ast_mutex_lock(&refreshlock); module_unloading = 1;