From: Mark Michelson Date: Mon, 11 Aug 2014 16:03:41 +0000 (+0000) Subject: Fix crash encountered by the testsuite. X-Git-Tag: 14.0.0-beta1~1766 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4e33c81e320a847be7b487c270c7be52ebe64fb;p=thirdparty%2Fasterisk.git Fix crash encountered by the testsuite. Running testsuite tests locally produced no errors, but when run using the continuous integration framework, crashes occurred. The crashes occurred due to a refcounting error that had been fixed for a similar situation. ........ Merged revisions 420758 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420759 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c index f3504ae44b..c9e8834c62 100644 --- a/res/res_pjsip_pubsub.c +++ b/res/res_pjsip_pubsub.c @@ -2032,7 +2032,10 @@ int ast_sip_subscription_notify(struct ast_sip_subscription *sub, void *notify_d if (sub->tree->notification_batch_interval) { return schedule_notification(sub->tree); } else { + /* See the note in pubsub_on_rx_refresh() for why sub->tree is refbumped here */ + ao2_ref(sub->tree, +1); return send_notify(sub->tree, 0); + ao2_ref(sub->tree, -1); } }