summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-04-03 13:56:43 -0500
committerRichard Mudgett <rmudgett@digium.com>2017-04-03 14:03:24 -0500
commita889621b14a55994fcfe68341af3cef2484ff74b (patch)
tree5fe298c42e0420c109b9ace311cc0d867f79d71d
parentcf4dd32befbd82bb9534f0f16bbc21341c03e8e5 (diff)
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
-rw-r--r--res/res_pjsip/pjsip_message_ip_updater.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_pjsip/pjsip_message_ip_updater.c b/res/res_pjsip/pjsip_message_ip_updater.c
index 864d898b3..2d074640a 100644
--- a/res/res_pjsip/pjsip_message_ip_updater.c
+++ b/res/res_pjsip/pjsip_message_ip_updater.c
@@ -339,8 +339,10 @@ static pj_bool_t multihomed_on_rx_message(pjsip_rx_data *rdata)
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);