[asterisk-commits] pjsip distributor.c: Fix off-nominal tdata ref leak. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 16 07:08:29 CST 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4926 )

Change subject: pjsip_distributor.c: Fix off-nominal tdata ref leak.
......................................................................


pjsip_distributor.c: Fix off-nominal tdata ref leak.

Change-Id: I571f371d0956a8039b197b4dbd8af6b18843598d
---
M res/res_pjsip/pjsip_distributor.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c
index 7412445..eabfa4b 100644
--- a/res/res_pjsip/pjsip_distributor.c
+++ b/res/res_pjsip/pjsip_distributor.c
@@ -729,8 +729,7 @@
 				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 @@
 			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;

-- 
To view, visit https://gerrit.asterisk.org/4926
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I571f371d0956a8039b197b4dbd8af6b18843598d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list