diff options
-rw-r--r-- | main/ccss.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/main/ccss.c b/main/ccss.c index a45ed2844..5dd1d70bf 100644 --- a/main/ccss.c +++ b/main/ccss.c @@ -4535,14 +4535,15 @@ static void cc_shutdown(void) if (cc_core_taskprocessor) { cc_core_taskprocessor = ast_taskprocessor_unreference(cc_core_taskprocessor); } - if (generic_monitors) { - ao2_t_ref(generic_monitors, -1, "Unref generic_monitor container in cc_shutdown"); - generic_monitors = NULL; - } + /* Note that core instances must be destroyed prior to the generic_monitors */ if (cc_core_instances) { ao2_t_ref(cc_core_instances, -1, "Unref cc_core_instances container in cc_shutdown"); cc_core_instances = NULL; } + if (generic_monitors) { + ao2_t_ref(generic_monitors, -1, "Unref generic_monitor container in cc_shutdown"); + generic_monitors = NULL; + } } int ast_cc_init(void) |