diff options
Diffstat (limited to 'cdr')
-rw-r--r-- | cdr/cdr_custom.c | 2 | ||||
-rw-r--r-- | cdr/cdr_syslog.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c index df763639f..6ef2cb094 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 458721aa8..c1169a35c 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); } } |