]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
[core, mod_cidlookup] Free memory allocated via strdup
authoryois615 <38441801+yois615@users.noreply.github.com>
Mon, 27 Mar 2023 22:47:23 +0000 (18:47 -0400)
committerGitHub <noreply@github.com>
Mon, 27 Mar 2023 22:47:23 +0000 (01:47 +0300)
commit965e88a6b0607eb7f248c9a95ba0c3652eda8e36
tree21ccf5992ba489175d51b3ddabd813a6845a9f41
parentf680a29405fea5daf8620ba45a50985e69851442
[core, mod_cidlookup] 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
src/mod/applications/mod_cidlookup/mod_cidlookup.c
src/switch_xml_config.c