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

prevent crash in crazy situation with xml_curl and bad urls FSCORE-169

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9307 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 2d19b3bf
......@@ -289,13 +289,17 @@ static switch_status_t timer_check(switch_timer_t *timer, switch_bool_t step)
static switch_status_t timer_destroy(switch_timer_t *timer)
{
timer_private_t *private_info = timer->private_info;
switch_mutex_lock(globals.mutex);
TIMER_MATRIX[timer->interval].count--;
if (TIMER_MATRIX[timer->interval].count == 0) {
TIMER_MATRIX[timer->interval].tick = 0;
if (timer->interval < MAX_ELEMENTS) {
switch_mutex_lock(globals.mutex);
TIMER_MATRIX[timer->interval].count--;
if (TIMER_MATRIX[timer->interval].count == 0) {
TIMER_MATRIX[timer->interval].tick = 0;
}
switch_mutex_unlock(globals.mutex);
}
if (private_info) {
private_info->ready = 0;
}
switch_mutex_unlock(globals.mutex);
private_info->ready = 0;
return SWITCH_STATUS_SUCCESS;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论