When creating the alphabetical sorted list each module is added to a list
temporarily. On the second iteration each module already has a pointer to
another module, causing stuff to go into a loop.
ASTERISK-24123 #close
Reported by: Malcolm Davenport
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419612
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
AST_LIST_INSERT_SORTALPHA(&alpha_module_list, cur, list_entry, resource);
}
- AST_LIST_TRAVERSE(&alpha_module_list, cur, list_entry) {
+ while ((cur = AST_LIST_REMOVE_HEAD(&alpha_module_list, list_entry))) {
total_mod_loaded += modentry(cur->resource, cur->info->description, cur->usecount,
cur->flags.running ? "Running" : "Not Running", like, cur->info->support_level);
}