Skip to content
Snippets Groups Projects
Commit 83c6ebba authored by Kevin Harwell's avatar Kevin Harwell
Browse files

stasis_state: Make unsubscribes NULL tolerant

Regular stasis unsubscribes can handle NULL subscription objects. This patch
makes it so stasis state unsubscribes handles NULL's as well.

ASTERISK-28442

Change-Id: Ic3648e8df043a85b77cff085e9ff10356028e479
parent 99addaff
No related branches found
No related tags found
No related merge requests found
......@@ -514,8 +514,11 @@ void *stasis_state_unsubscribe(struct stasis_state_subscriber *sub)
void *stasis_state_unsubscribe_and_join(struct stasis_state_subscriber *sub)
{
sub->stasis_sub = stasis_unsubscribe_and_join(sub->stasis_sub);
ao2_ref(sub, -1);
if (sub) {
sub->stasis_sub = stasis_unsubscribe_and_join(sub->stasis_sub);
ao2_ref(sub, -1);
}
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment