Index: apps/app_meetme.c =================================================================== --- apps/app_meetme.c (revision 89546) +++ apps/app_meetme.c (working copy) @@ -5172,15 +5172,22 @@ { struct sla_trunk *trunk; struct sla_station *station; + struct ast_context *con; AST_RWLIST_WRLOCK(&sla_trunks); - while ((trunk = AST_RWLIST_REMOVE_HEAD(&sla_trunks, entry))) + while ((trunk = AST_RWLIST_REMOVE_HEAD(&sla_trunks, entry))) { + if (!ast_strlen_zero(trunk->autocontext) && (con = ast_context_find(trunk->autocontext))) + ast_context_destroy(con, sla_registrar); destroy_trunk(trunk); + } AST_RWLIST_UNLOCK(&sla_trunks); AST_RWLIST_WRLOCK(&sla_stations); - while ((station = AST_RWLIST_REMOVE_HEAD(&sla_stations, entry))) + while ((station = AST_RWLIST_REMOVE_HEAD(&sla_stations, entry))) { + if (!ast_strlen_zero(station->autocontext) && (con = ast_context_find(station->autocontext))) + ast_context_destroy(con, sla_registrar); destroy_station(station); + } AST_RWLIST_UNLOCK(&sla_stations); if (sla.thread != AST_PTHREADT_NULL) {