mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-11 03:57:14 +00:00
FS-10118: [freeswitch-core] Race conditions from lack of error checking in switch_core_session_read_lock #resolve
This commit is contained in:
1 parent
abcb7f83a1
commit
35865bd90c
6 files changed
+76
-23
No files matched your search
+10
-2
@@ -158,8 +158,16 @@ static void video_bridge_thread(switch_core_session_t *session, void *obj)
|
||||
|
||||
vh->up = 1;
|
||||
|
||||
switch_core_session_read_lock(vh->session_a);
|
||||
switch_core_session_read_lock(vh->session_b);
|
||||
if (switch_core_session_read_lock(vh->session_a) != SWITCH_STATUS_SUCCESS) {
|
||||
vh->up = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (switch_core_session_read_lock(vh->session_b) != SWITCH_STATUS_SUCCESS) {
|
||||
vh->up = 0;
|
||||
switch_core_session_rwunlock(vh->session_a);
|
||||
return;
|
||||
}
|
||||
|
||||
switch_core_session_request_video_refresh(vh->session_a);
|
||||
switch_core_session_request_video_refresh(vh->session_b);
|
||||
|
||||
Reference in new issue
Block a user