mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-03 22:26:51 +00:00
fix crash in mod_fifo when deleting a node when its in use
This commit is contained in:
parent
076726a163
commit
5bbc372c56
@ -1224,10 +1224,15 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
|
|||||||
node_name = cbh->rows[0]->node_name;
|
node_name = cbh->rows[0]->node_name;
|
||||||
|
|
||||||
switch_mutex_lock(globals.mutex);
|
switch_mutex_lock(globals.mutex);
|
||||||
node = switch_core_hash_find(globals.fifo_hash, node_name);
|
if ((node = switch_core_hash_find(globals.fifo_hash, node_name))) {
|
||||||
switch_thread_rwlock_rdlock(node->rwlock);
|
switch_thread_rwlock_rdlock(node->rwlock);
|
||||||
|
}
|
||||||
switch_mutex_unlock(globals.mutex);
|
switch_mutex_unlock(globals.mutex);
|
||||||
|
|
||||||
|
if (!node) {
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < cbh->rowcount; i++) {
|
for (i = 0; i < cbh->rowcount; i++) {
|
||||||
struct call_helper *h = cbh->rows[i];
|
struct call_helper *h = cbh->rows[i];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user