freeswitch
                                
                                 freeswitch copied to clipboard
                                
                                    freeswitch copied to clipboard
                            
                            
                            
                        Memory leak when some modules are unloaded
Describe the bug Modules that use SWITCH_CONFIG_ITEM_STRING_STRDUP to read config options are not properly freed at module unload.
To Reproduce Steps to reproduce the behavior:
- enable mod_cidlookup (affected example)
- Add a url parameter to autoload_configs/cidlookup.conf.xml
- compile with ASAN
- start and stop freeswitch in interactive mode
- ASAN shows memory leaks from switch_xml_config.c:314
Expected behavior Memory is freed when module is unloaded
Package version or git hash
- Version [e.g. 1.10.7]
There seem to be two reasons that this is happening:
- mod_cidlookup doesn't include switch_xml_config_cleanup in its shutdown macro
- switch_xml_config_cleanup contains an if statement requiring string_options that may not exist.