[Core] process_device_hup: Coverity 1546196 Check of thread-shared field evades lock acquisition

This commit is contained in:
Andrey Volk 2024-06-12 15:14:29 +03:00
parent 73ee47d72f
commit e9cf10583a
1 changed files with 3 additions and 1 deletions

View File

@ -5185,11 +5185,13 @@ static void process_device_hup(switch_channel_t *channel)
switch_device_record_t *drec = NULL;
switch_device_node_t *node;
switch_mutex_lock(globals.device_mutex);
if (!channel->device_node) {
switch_mutex_unlock(globals.device_mutex);
return;
}
switch_mutex_lock(globals.device_mutex);
node = channel->device_node;
drec = channel->device_node->parent;