summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c10
-rw-r--r--main/config.c4
-rw-r--r--main/indications.c3
-rw-r--r--main/named_acl.c2
-rw-r--r--main/translate.c16
-rw-r--r--res/res_security_log.c2
6 files changed, 37 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 55b1ed550..bec53b776 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -34662,7 +34662,12 @@ static int unload_module(void)
clear_sip_domains();
sip_cfg.contact_acl = ast_free_acl_list(sip_cfg.contact_acl);
+ if (sipsock_read_id) {
+ ast_io_remove(io, sipsock_read_id);
+ sipsock_read_id = NULL;
+ }
close(sipsock);
+ io_context_destroy(io);
ast_sched_context_destroy(sched);
con = ast_context_find(used_context);
if (con) {
@@ -34676,6 +34681,11 @@ static int unload_module(void)
sip_reqresp_parser_exit();
sip_unregister_tests();
+ if (notify_types) {
+ ast_config_destroy(notify_types);
+ notify_types = NULL;
+ }
+
ast_format_cap_destroy(sip_tech.capabilities);
sip_cfg.caps = ast_format_cap_destroy(sip_cfg.caps);
diff --git a/main/config.c b/main/config.c
index 5220679a2..112623104 100644
--- a/main/config.c
+++ b/main/config.c
@@ -3248,6 +3248,10 @@ static void config_shutdown(void)
AST_LIST_LOCK(&cfmtime_head);
while ((cfmtime = AST_LIST_REMOVE_HEAD(&cfmtime_head, list))) {
+ struct cache_file_include *cfinclude;
+ while ((cfinclude = AST_LIST_REMOVE_HEAD(&cfmtime->includes, list))) {
+ ast_free(cfinclude);
+ }
ast_free(cfmtime);
}
AST_LIST_UNLOCK(&cfmtime_head);
diff --git a/main/indications.c b/main/indications.c
index 39c9c6e7b..8d644e53e 100644
--- a/main/indications.c
+++ b/main/indications.c
@@ -499,6 +499,9 @@ struct ast_tone_zone_sound *ast_get_indication_tone(const struct ast_tone_zone *
ast_tone_zone_unlock(zone);
+ if (!_zone)
+ zone = ast_tone_zone_unref(zone);
+
return ts;
}
diff --git a/main/named_acl.c b/main/named_acl.c
index a93f78954..f0b5c2894 100644
--- a/main/named_acl.c
+++ b/main/named_acl.c
@@ -567,6 +567,8 @@ static struct ast_cli_entry cli_named_acl[] = {
static void named_acl_cleanup(void)
{
+ ast_cli_unregister_multiple(cli_named_acl, ARRAY_LEN(cli_named_acl));
+
STASIS_MESSAGE_TYPE_CLEANUP(ast_named_acl_change_type);
aco_info_destroy(&cfg_info);
ao2_global_obj_release(globals);
diff --git a/main/translate.c b/main/translate.c
index ce430ce97..a258599d2 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -1396,11 +1396,27 @@ void ast_translate_available_formats(struct ast_format_cap *dest, struct ast_for
ast_format_cap_iter_end(src);
}
+static void translate_shutdown(void)
+{
+ int x;
+ ast_cli_unregister_multiple(cli_translate, ARRAY_LEN(cli_translate));
+
+ ast_rwlock_wrlock(&tablelock);
+ for (x = 0; x < index_size; x++) {
+ ast_free(__matrix[x]);
+ }
+ ast_free(__matrix);
+ ast_free(__indextable);
+ ast_rwlock_unlock(&tablelock);
+ ast_rwlock_destroy(&tablelock);
+}
+
int ast_translate_init(void)
{
int res = 0;
ast_rwlock_init(&tablelock);
res = matrix_resize(1);
res |= ast_cli_register_multiple(cli_translate, ARRAY_LEN(cli_translate));
+ ast_register_atexit(translate_shutdown);
return res;
}
diff --git a/res/res_security_log.c b/res/res_security_log.c
index 9e87acf12..d06f9f754 100644
--- a/res/res_security_log.c
+++ b/res/res_security_log.c
@@ -155,6 +155,8 @@ static int unload_module(void)
security_stasis_sub = stasis_unsubscribe(security_stasis_sub);
}
+ ast_logger_unregister_level(LOG_SECURITY_NAME);
+
ast_verb(3, "Security Logging Disabled\n");
return 0;