diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-06-25 01:12:58 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-06-25 01:12:58 +0000 |
commit | 13b470d704285b596caab33039fdf1b063bbcf9d (patch) | |
tree | 74dae44213d76a78b1ae30da11bb43e92e9f8ead /res/res_calendar.c | |
parent | 91217ac3c1fd73efe13407a013260ac7cf937b7b (diff) |
Fix memory/ref counting leaks in a variety of locations
This patch fixes the following memory leaks:
* http.c: The structure containing the addresses to bind to was not being
deallocated when no longer used
* named_acl.c: The global configuration information was not disposed of
* config_options.c: An invalid read was occurring for certain option types.
* res_calendar.c: The loaded calendars on module unload were not being
properly disposed of.
* chan_motif.c: The format capabilities needed to be disposed of on module
unload. In addition, this now specifies the default options for the
maxpayloads and maxicecandidates in such a way that it doesn't cause the
invalid read in config_options.c to occur.
(issue ASTERISK-21906)
Reported by: John Hardin
patches:
http.patch uploaded by jhardin (license 6512)
named_acl.patch uploaded by jhardin (license 6512)
config_options.patch uploaded by jhardin (license 6512)
res_calendar.patch uploaded by jhardin (license 6512)
chan_motif.patch uploaded by jhardin (license 6512)
........
Merged revisions 392810 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_calendar.c')
-rw-r--r-- | res/res_calendar.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_calendar.c b/res/res_calendar.c index fd4237513..dfae4985a 100644 --- a/res/res_calendar.c +++ b/res/res_calendar.c @@ -1819,6 +1819,8 @@ static int unload_module(void) /* Remove all calendars */ ao2_callback(calendars, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL); + ao2_cleanup(calendars); + calendars = NULL; ast_mutex_lock(&refreshlock); module_unloading = 1; |