[Asterisk-code-review] res pjsip pubsub: Clear self-reference on terminated subscri... (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Mon Oct 23 12:26:51 CDT 2017
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/6857 )
Change subject: res_pjsip_pubsub: Clear self-reference on terminated subscription tree.
......................................................................
Patch Set 1:
(1 comment)
> Is this a master-only thing or are cherry-picks coming?
This is an issue for 15 and master. I'm not going to cherry-pick until I'm more confident of the fix.
https://gerrit.asterisk.org/#/c/6857/1/res/res_pjsip_pubsub.c
File res/res_pjsip_pubsub.c:
https://gerrit.asterisk.org/#/c/6857/1/res/res_pjsip_pubsub.c@3683
PS1, Line 3683: if (sub_tree->root) {
: ast_sip_subscription_destroy(sub_tree->root);
: }
> I think before this is done we need to document the specific lifetime and r
I'd love to do that but I'm not fully confident that I understand the lifecycle of subscription trees. At this stage I've posted this patch to say:
This seems to fix the error, does it seem reasonable/correct?
I have traced out all +1/-1 references on subscription tree's, I have determined that sub_tree->root->tree is never released. I do not know if this is the correct place to release that reference.
In the reference logs I've reviewed the ao2_ref(sub_tree, -1) below (Remove evsub's reference) is another one I'm not fully sure of. I believe evsub is holding the allocation reference? If that's the case I can add a comment to the subscription tree allocation routine.
--
To view, visit https://gerrit.asterisk.org/6857
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7baddee3c16dfdc5a12fa652c5359de465e9ebbf
Gerrit-Change-Number: 6857
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Comment-Date: Mon, 23 Oct 2017 17:26:51 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171023/81d6efc3/attachment.html>
More information about the asterisk-code-review
mailing list