freeswitch
freeswitch copied to clipboard
[switch_xml_config] Free memory allocated via strdup
In mod_cidlookup and several other modules, config parameters are read from external XML files using the SWITCH_CONFIG_ITEM_STRING_STRDUP method. These items do not have string_options, and are not freed with switch_xml_config_cleanup. We therefore need to call switch_safe_free for config without string_options. We also add switch_xml_config_cleanup to mod_cidlookup. There are other modules that may be affected but this commit makes no attempt at fixing those.
Fixes #1752
Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/613/artifacts.html
Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/842/artifacts.html