[Asterisk-code-review] res pjsip: Fix transport ref leak. (asterisk[14])

Richard Mudgett asteriskteam at digium.com
Mon Apr 3 14:03:17 CDT 2017


Richard Mudgett has uploaded a new change for review. ( https://gerrit.asterisk.org/5385 )

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(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/5385/1

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/5385
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a96658a9614a060565bb9ad51cb1c9c11ee145f
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list