Unverified 提交 318e5d0d authored 作者: lazedo's avatar lazedo 提交者: GitHub

[mod_kazoo] fix xml leak when event-filter is not available

上级 f6c10f86
...@@ -866,7 +866,8 @@ static void fetch_config_filters(switch_memory_pool_t *pool) ...@@ -866,7 +866,8 @@ static void fetch_config_filters(switch_memory_pool_t *pool)
if (!(xml = switch_xml_open_cfg(cf, &cfg, params))) { if (!(xml = switch_xml_open_cfg(cf, &cfg, params))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open configuration file %s\n", cf); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to open configuration file %s\n", cf);
} else if ((child = switch_xml_child(cfg, "event-filter"))) { } else {
if ((child = switch_xml_child(cfg, "event-filter"))) {
switch_hash_t *filter; switch_hash_t *filter;
switch_hash_t *old_filter; switch_hash_t *old_filter;
...@@ -881,9 +882,10 @@ static void fetch_config_filters(switch_memory_pool_t *pool) ...@@ -881,9 +882,10 @@ static void fetch_config_filters(switch_memory_pool_t *pool)
if (old_filter) { if (old_filter) {
switch_core_hash_destroy(&old_filter); switch_core_hash_destroy(&old_filter);
} }
}
kazoo_globals.config_fetched = 1; kazoo_globals.config_fetched = 1;
switch_xml_free(xml); switch_xml_free(xml);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论