mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 19:20:35 +00:00
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
This commit is contained in:
@@ -186,14 +186,15 @@ static int link_option_to_types(struct aco_info *info, struct aco_type **types,
|
||||
|| xmldoc_update_config_option(types, info->module, opt->name, type->name, opt->default_val, opt->match_type == ACO_REGEX, opt->type)
|
||||
#endif /* AST_XML_DOCS */
|
||||
) {
|
||||
while (--idx) {
|
||||
do {
|
||||
ao2_unlink(types[idx]->internal->opts, opt);
|
||||
}
|
||||
} while (--idx);
|
||||
return -1;
|
||||
}
|
||||
/* The container should hold the only ref to opt */
|
||||
ao2_ref(opt, -1);
|
||||
}
|
||||
/* The container(s) should hold the only ref to opt */
|
||||
ao2_ref(opt, -1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user