diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c index df763639fa8cb8277727636558fc47cda6c7b9c2..6ef2cb094e3919d86d22a820c74e7e495be21f07 100644 --- a/cdr/cdr_custom.c +++ b/cdr/cdr_custom.c @@ -81,8 +81,10 @@ static AST_RWLIST_HEAD_STATIC(sinks, cdr_custom_config); static void free_config(void) { struct cdr_custom_config *sink; + while ((sink = AST_RWLIST_REMOVE_HEAD(&sinks, list))) { ast_mutex_destroy(&sink->lock); + ast_string_field_free_memory(sink); ast_free(sink); } } diff --git a/cdr/cdr_syslog.c b/cdr/cdr_syslog.c index 458721aa832213c77eeb8657f488f79d55badb0e..c1169a35c50f32481c40188844db4778d5df4c6f 100644 --- a/cdr/cdr_syslog.c +++ b/cdr/cdr_syslog.c @@ -76,8 +76,10 @@ static AST_RWLIST_HEAD_STATIC(sinks, cdr_syslog_config); static void free_config(void) { struct cdr_syslog_config *sink; + while ((sink = AST_RWLIST_REMOVE_HEAD(&sinks, list))) { ast_mutex_destroy(&sink->lock); + ast_string_field_free_memory(sink); ast_free(sink); } } diff --git a/cel/cel_custom.c b/cel/cel_custom.c index edb009686ec38d0de9ea2f1db58abe606ae397a2..0b2ac764f75e65bfa3fbab8cc7eb47ebe853ac8c 100644 --- a/cel/cel_custom.c +++ b/cel/cel_custom.c @@ -71,8 +71,10 @@ static AST_RWLIST_HEAD_STATIC(sinks, cel_config); static void free_config(void) { struct cel_config *sink; + while ((sink = AST_RWLIST_REMOVE_HEAD(&sinks, list))) { ast_mutex_destroy(&sink->lock); + ast_string_field_free_memory(sink); ast_free(sink); } } diff --git a/main/logger.c b/main/logger.c index 9f03b4efa3a1847fdfb469afabb2f21784e5c739..a70b6d15eb3279441d30af55787c2d7c377060e9 100644 --- a/main/logger.c +++ b/main/logger.c @@ -168,6 +168,7 @@ static void logmsg_free(struct logmsg *msg) if (msg->callid) { ast_callid_unref(msg->callid); } + ast_string_field_free_memory(msg); ast_free(msg); }