FS-11377 [freeswitch-core] lock/unlock mutexes in consistent order.

This commit is contained in:
Chris Rienzo 2018-09-05 16:36:04 -04:00 committed by Mike Jerris
parent 3fc867fa93
commit 48aebd7365
1 changed files with 3 additions and 3 deletions

View File

@ -1309,8 +1309,8 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
end: end:
switch_mutex_unlock(rtp_session->ice_mutex); switch_mutex_unlock(rtp_session->ice_mutex);
READ_DEC(rtp_session);
WRITE_DEC(rtp_session); WRITE_DEC(rtp_session);
READ_DEC(rtp_session);
} }
#ifdef ENABLE_ZRTP #ifdef ENABLE_ZRTP
@ -2675,8 +2675,8 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
WRITE_INC(rtp_session);
READ_INC(rtp_session); READ_INC(rtp_session);
WRITE_INC(rtp_session);
if (!switch_rtp_ready(rtp_session)) { if (!switch_rtp_ready(rtp_session)) {
goto done; goto done;
@ -4993,8 +4993,8 @@ SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session)
(*rtp_session)->ready = 0; (*rtp_session)->ready = 0;
READ_DEC((*rtp_session));
WRITE_DEC((*rtp_session)); WRITE_DEC((*rtp_session));
READ_DEC((*rtp_session));
if ((*rtp_session)->flags[SWITCH_RTP_FLAG_VAD]) { if ((*rtp_session)->flags[SWITCH_RTP_FLAG_VAD]) {
switch_rtp_disable_vad(*rtp_session); switch_rtp_disable_vad(*rtp_session);