Fix potential dereference of null pointer

The node could conceivably disappear before we grab the globals mutex
and we'd get back a null pointer.
This commit is contained in:
Travis Cross 2014-05-29 14:10:44 +00:00
parent 17137d089d
commit e66d24622a
1 changed files with 1 additions and 1 deletions

View File

@ -1791,7 +1791,7 @@ static void *SWITCH_THREAD_FUNC outbound_enterprise_thread_run(switch_thread_t *
switch_mutex_lock(globals.mutex);
node = switch_core_hash_find(globals.fifo_hash, h->node_name);
switch_thread_rwlock_rdlock(node->rwlock);
if (node) switch_thread_rwlock_rdlock(node->rwlock);
switch_mutex_unlock(globals.mutex);
if (node) {