diff options
author | Richard Mudgett <rmudgett@digium.com> | 2017-02-11 11:26:58 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2017-02-12 15:29:05 -0600 |
commit | 67b21dc63afb94e4a8b913f149cfc220e16790f7 (patch) | |
tree | 67d3ef62b7d66748522c8c6313c080f985a73de2 /res | |
parent | c7fcc4468ffd54066129a982ff5b0a3cdfa7c5e0 (diff) |
pjsip_distributor.c: Fix off-nominal tdata ref leak.
Change-Id: I571f371d0956a8039b197b4dbd8af6b18843598d
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip/pjsip_distributor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c index 79006110a..82ca184d3 100644 --- a/res/res_pjsip/pjsip_distributor.c +++ b/res/res_pjsip/pjsip_distributor.c @@ -729,8 +729,7 @@ static pj_bool_t authenticate(pjsip_rx_data *rdata) ao2_ref(unid, -1); } ast_sip_report_auth_success(endpoint, rdata); - pjsip_tx_data_dec_ref(tdata); - return PJ_FALSE; + break; case AST_SIP_AUTHENTICATION_FAILED: log_failed_request(rdata, "Failed to authenticate", 0, 0); ast_sip_report_auth_failed_challenge_response(endpoint, rdata); @@ -743,6 +742,7 @@ static pj_bool_t authenticate(pjsip_rx_data *rdata) pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 500, NULL, NULL, NULL); return PJ_TRUE; } + pjsip_tx_data_dec_ref(tdata); } return PJ_FALSE; |