From: Alexei Gradinari Date: Tue, 19 Jul 2016 20:22:39 +0000 (-0400) Subject: res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice. X-Git-Tag: certified/13.8-cert4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7baedd9ecd3cd4f3d1463f3e6f0f694bd56237d7;p=thirdparty%2Fasterisk.git res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice. This patch removed call of pjsip_tx_data_dec_ref in send_notify if send_request failed. The pjsip_dlg_send_request deletes the message on error by itself. It seems this patch fixes next issues: ASTERISK-26199 ASTERISK-26166 ASTERISK-26174 Change-Id: I8b05917c93d993f95d604c042ace5f1a5500f59a --- diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c index c24ac0176c..7db2b4d498 100644 --- a/res/res_pjsip_pubsub.c +++ b/res/res_pjsip_pubsub.c @@ -2271,7 +2271,7 @@ static int send_notify(struct sip_subscription_tree *sub_tree, unsigned int forc } if (sip_subscription_send_request(sub_tree, tdata)) { - pjsip_tx_data_dec_ref(tdata); + /* do not call pjsip_tx_data_dec_ref(tdata). The pjsip_dlg_send_request deletes the message on error */ return -1; }