From dcdc0cdaac3084fa3f6afc81c390181955d33e74 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 9 Oct 2006 14:47:36 +0000 Subject: [PATCH] bug pointed out by stkn, thanks\! git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3008 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index cecfa5072c..ca6ddaecfb 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2944,7 +2944,7 @@ static void event_callback(nua_event_t event, switch_channel_t *channel = switch_core_session_get_channel(tech_pvt->session); switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); nua_respond(nh, SIP_401_UNAUTHORIZED, TAG_END()); - return; + goto done; } } @@ -3067,6 +3067,8 @@ static void event_callback(nua_event_t event, } + done: + if (session) { switch_core_session_rwunlock(session); }