]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_pubsub: Fix reference to released endpoint
authorGeorge Joseph <gjoseph@digium.com>
Wed, 14 Jun 2017 16:12:21 +0000 (10:12 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 14 Jun 2017 16:16:42 +0000 (11:16 -0500)
commit382ae913d7bbcd026ee6246baba0a3c561591970
tree177f2fc94399dc58109e403bbb4c00ba765810a9
parentff25f58d19a9954dfa2df56263eca4638a200df9
res_pjsip_pubsub:  Fix reference to released endpoint

destroy_subscription was attempting to get the id of the
subscription tree's endpoint after we'd already called ao2_cleanup
on it causing a segfault.

Moved the cleanup until after the debug statement and since
endpoint could also be NULL at this point, check for that as well.

ASTERISK-27057 #close
Reported-by: Ryan Smith
Change-Id: Ice0a7727f560cf204d870a774c6df71e159b1678
res/res_pjsip_pubsub.c