diff options
author | Joshua Colp <jcolp@digium.com> | 2015-08-24 13:04:57 -0300 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2015-08-24 13:06:09 -0300 |
commit | 7c4d0c3506374b89502bd6c1bda89c3f241b6708 (patch) | |
tree | 8db58ebc56dc39a56f38cab6b9bd21e413abbbae /res | |
parent | e0cf42f61e870eb17853efd82b2652b7dbc2ac0a (diff) |
res_pjsip_pubsub: On recreated notify fail deleted sub_tree is referenced
When recreating a subscription it is possible for a freed sub_tree
to be referenced when the initial NOTIFY fails to be created.
Change-Id: I681c215309aad01b21d611c2de47b3b0a6022788
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip_pubsub.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c index 3e3ced71f..8cd5b7bf1 100644 --- a/res/res_pjsip_pubsub.c +++ b/res/res_pjsip_pubsub.c @@ -1393,8 +1393,9 @@ static int subscription_persistence_recreate(void *obj, void *arg, int flags) subscription_persistence_update(sub_tree, &rdata); if (generate_initial_notify(sub_tree->root)) { pjsip_evsub_terminate(sub_tree->evsub, PJ_TRUE); + } else { + send_notify(sub_tree, 1); } - send_notify(sub_tree, 1); } else { ast_sorcery_delete(ast_sip_get_sorcery(), persistence); } |