Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
subscriptions: Fix crash when subscription is in the remove queue lis…
…t, but unsubscribed before
  • Loading branch information
perexg committed Mar 17, 2015
1 parent 74adbe8 commit e16a5ca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/subscriptions.c
Expand Up @@ -336,10 +336,8 @@ subscription_reschedule(void)
subscription_show_info(s);
}

while ((s = LIST_FIRST(&subscriptions_remove))) {
LIST_REMOVE(s, ths_remove_link);
while ((s = LIST_FIRST(&subscriptions_remove)))
subscription_unsubscribe(s, 0);
}

if (postpone <= 0 || postpone == INT_MAX)
postpone = 2;
Expand Down Expand Up @@ -513,6 +511,7 @@ subscription_unsubscribe(th_subscription_t *s, int quiet)
service_instance_list_clear(&s->ths_instances);

LIST_REMOVE(s, ths_global_link);
LIST_SAFE_REMOVE(s, ths_remove_link);

#if ENABLE_MPEGTS
if (s->ths_raw_service)
Expand Down

0 comments on commit e16a5ca

Please sign in to comment.