[Asterisk-code-review] res pjsip pubsub: Clear self-reference on terminated subscri... (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Fri Oct 20 15:57:44 CDT 2017
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/6857
Change subject: res_pjsip_pubsub: Clear self-reference on terminated subscription tree.
......................................................................
res_pjsip_pubsub: Clear self-reference on terminated subscription tree.
Call ast_sip_subscription_destroy(sub_tree->root) from pubsub_on_evsub_state.
This allows sub_tree to eventually be freed.
ASTERISK-25150
Change-Id: I7baddee3c16dfdc5a12fa652c5359de465e9ebbf
---
M res/res_pjsip_pubsub.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/57/6857/1
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index a1bfbb7..bc37e1e 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -3680,6 +3680,9 @@
shutdown_subscriptions(sub_tree->root);
sub_tree->state = SIP_SUB_TREE_TERMINATED;
+ if (sub_tree->root) {
+ ast_sip_subscription_destroy(sub_tree->root);
+ }
/* Remove evsub's reference to the sub_tree */
ao2_ref(sub_tree, -1);
}
--
To view, visit https://gerrit.asterisk.org/6857
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7baddee3c16dfdc5a12fa652c5359de465e9ebbf
Gerrit-Change-Number: 6857
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171020/e08ad8dc/attachment.html>
More information about the asterisk-code-review
mailing list