From c393c23155fdc61c6809b58bd6b56c2647c97f58 Mon Sep 17 00:00:00 2001 From: Alessandro Toppi Date: Wed, 7 Oct 2020 11:50:49 +0200 Subject: [PATCH] Do not handle session stack mutex if helper has not been created. --- plugins/janus_sip.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/janus_sip.c b/plugins/janus_sip.c index 1d363e9e34..5bf57800c0 100644 --- a/plugins/janus_sip.c +++ b/plugins/janus_sip.c @@ -3104,7 +3104,6 @@ static void *janus_sip_handler(void *data) { if(nh == NULL) { /* We don't, create one now */ if(!session->helper) { - janus_mutex_lock(&session->stack->smutex); if(session->stack->s_nua == NULL) { janus_mutex_unlock(&session->stack->smutex); JANUS_LOG(LOG_ERR, "NUA destroyed while subscribing?\n"); @@ -3113,7 +3112,6 @@ static void *janus_sip_handler(void *data) { goto error; } nh = nua_handle(session->stack->s_nua, session, TAG_END()); - janus_mutex_unlock(&session->stack->smutex); } else { /* This is a helper, we need to use the master's SIP stack */ if(session->master == NULL || session->master->stack == NULL) {