summaryrefslogtreecommitdiff
path: root/res/res_pjsip_pubsub.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2014-08-11 15:59:17 +0000
committerMark Michelson <mmichelson@digium.com>2014-08-11 15:59:17 +0000
commitc43c22fe89a1aaf57b562e48d0d8f4fdbd3d7686 (patch)
tree753f5cbad2520ff9317f50df5ac030010461331a /res/res_pjsip_pubsub.c
parentcc7853f40f6b6b67cd9f2352e79537e9360a5024 (diff)
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. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@420758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_pubsub.c')
-rw-r--r--res/res_pjsip_pubsub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index f3504ae44..c9e8834c6 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);
}
}