[asterisk-commits] res pjsip: Fix transport ref leak. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 3 17:37:01 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5386 )

Change subject: res_pjsip: Fix transport ref leak.
......................................................................


res_pjsip: Fix transport ref leak.

We were leaking a transport ref in multihomed_on_rx_message() which
resulted in the FRACK about excessive ref counts.

ASTERISK-26916 #close

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

Approvals:
  Mark Michelson: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/res/res_pjsip/pjsip_message_ip_updater.c b/res/res_pjsip/pjsip_message_ip_updater.c
index 864d898..2d07464 100644
--- a/res/res_pjsip/pjsip_message_ip_updater.c
+++ b/res/res_pjsip/pjsip_message_ip_updater.c
@@ -339,8 +339,10 @@
 	transport = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "transport", transport_id);
 
 	if (!(transport && transport->symmetric_transport)) {
+		ao2_cleanup(transport);
 		return PJ_FALSE;
 	}
+	ao2_cleanup(transport);
 
 	x_transport = PJ_POOL_ALLOC_T(rdata->tp_info.pool, pjsip_param);
 	x_transport->name = pj_strdup3(rdata->tp_info.pool, AST_SIP_X_AST_TXP);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a96658a9614a060565bb9ad51cb1c9c11ee145f
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>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list