diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-06-01 13:57:53 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-06-01 13:57:53 -0500 |
commit | e2132dd3588b10538f7c67a92aa26b9b4a5bf1b5 (patch) | |
tree | 86bc10f9ce4264c4e7ec18fd36713224b2a094f7 /cel | |
parent | acb614d5aeb9cb19d2ded895fff585575fcb24c0 (diff) |
logging,cdr,cel: Fix stringfield memory leak.
The stringfields refactor to allow adding stringfields to the end of a
structure (f6f4cf459f43f072604927209b39646f84aaa2e2) exposed some
incomplete cleanup code by some stringfield users.
The most noticeable leaker is the logging system where there is a leak for
every log message generated.
ASTERISK-26078 #close
Reported by: Etienne Lessard
Patches:
jira_asterisk_26078_v13.patch (license #5621) patch uploaded
by Richard Mudgett
Change-Id: If6a08b31336b492c3de6f9dfd07c447f8d5a8782
Diffstat (limited to 'cel')
-rw-r--r-- | cel/cel_custom.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cel/cel_custom.c b/cel/cel_custom.c index edb009686..0b2ac764f 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); } } |