From: Andreas Ă–man Date: Wed, 8 Jun 2011 21:04:33 +0000 (+0200) Subject: epg: Correctly unlink from channels (avoid rearming timers causing segfault) X-Git-Tag: 2.99~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8710c712f45157999e19aef92661686a0f612d5;p=thirdparty%2Ftvheadend.git epg: Correctly unlink from channels (avoid rearming timers causing segfault) Fixes #553 Fixes #533 Fixes #513 --- diff --git a/src/epg.c b/src/epg.c index aac82ea90..e1d5afdd3 100644 --- a/src/epg.c +++ b/src/epg.c @@ -482,11 +482,12 @@ epg_unlink_from_channel(channel_t *ch) { event_t *e; + while((e = ch->ch_epg_events.root) != NULL) + epg_remove_event_from_channel(ch, e); + gtimer_disarm(&ch->ch_epg_timer_head); gtimer_disarm(&ch->ch_epg_timer_current); - while((e = ch->ch_epg_events.root) != NULL) - epg_remove_event_from_channel(ch, e); }