提交 dfa791e0 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-8721 #resolve [Bug removal at call end causes eavesdrop memory leak] #comment…

FS-8721 #resolve [Bug removal at call end causes eavesdrop memory leak] #comment This should do it, bug_remove_all is called after destroy where it's more than safe to kill bugs indiscriminately
上级 10df6003
...@@ -1101,7 +1101,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_remove_all_function(switch ...@@ -1101,7 +1101,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_remove_all_function(switch
if (session->bugs) { if (session->bugs) {
switch_thread_rwlock_wrlock(session->bug_rwlock); switch_thread_rwlock_wrlock(session->bug_rwlock);
for (bp = session->bugs; bp; bp = bp->next) { for (bp = session->bugs; bp; bp = bp->next) {
if ((bp->thread_id && bp->thread_id != switch_thread_self()) || switch_test_flag(bp, SMBF_LOCK)) { if (!switch_test_flag(session, SSF_DESTROYABLE) &&
((bp->thread_id && bp->thread_id != switch_thread_self()) || switch_test_flag(bp, SMBF_LOCK))) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "BUG is thread locked skipping.\n"); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "BUG is thread locked skipping.\n");
continue; continue;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论