Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
subscriptions: fix the wrong memory access in subscription_unsubscribe
  • Loading branch information
perexg committed Nov 15, 2015
1 parent 52759be commit fe4d7f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subscriptions.c
Expand Up @@ -599,8 +599,6 @@ subscription_unsubscribe(th_subscription_t *s, int flags)
}
s->ths_state = SUBSCRIPTION_ZOMBIE;

service_instance_list_clear(&s->ths_instances);

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

Expand Down Expand Up @@ -631,6 +629,8 @@ subscription_unsubscribe(th_subscription_t *s, int flags)
if (t)
service_remove_subscriber(t, s, SM_CODE_OK);

service_instance_list_clear(&s->ths_instances);

gtimer_disarm(&s->ths_remove_timer);

if ((flags & UNSUBSCRIBE_FINAL) != 0 ||
Expand Down

0 comments on commit fe4d7f8

Please sign in to comment.