mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-14 11:06:36 +00:00
[Core] process_device_hup: Coverity 1546196 Check of thread-shared field evades lock acquisition
This commit is contained in:
parent
73ee47d72f
commit
e9cf10583a
@ -5185,11 +5185,13 @@ static void process_device_hup(switch_channel_t *channel)
|
|||||||
switch_device_record_t *drec = NULL;
|
switch_device_record_t *drec = NULL;
|
||||||
switch_device_node_t *node;
|
switch_device_node_t *node;
|
||||||
|
|
||||||
|
switch_mutex_lock(globals.device_mutex);
|
||||||
if (!channel->device_node) {
|
if (!channel->device_node) {
|
||||||
|
switch_mutex_unlock(globals.device_mutex);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_mutex_lock(globals.device_mutex);
|
|
||||||
node = channel->device_node;
|
node = channel->device_node;
|
||||||
drec = channel->device_node->parent;
|
drec = channel->device_node->parent;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user