]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice. 54/3254/5
authorAlexei Gradinari <alex2grad@gmail.com>
Tue, 19 Jul 2016 20:22:39 +0000 (16:22 -0400)
committerAlexei Gradinari <alex2grad@gmail.com>
Thu, 21 Jul 2016 15:21:05 +0000 (11:21 -0400)
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

res/res_pjsip_pubsub.c

index f0e921cb89f18dafbc33fdcf8804fadcb1f69ef0..3ac3f342fe4b7f53263ebacd46e99df88dd0a809 100644 (file)
@@ -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;
        }