Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
channels: fix list remove for epg linked channels (see #4134)
  • Loading branch information
perexg committed Dec 18, 2016
1 parent f49ea87 commit dc9238e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/channels.c
Expand Up @@ -1062,13 +1062,13 @@ channel_delete ( channel_t *ch, int delconf )
epggrab_channel_rem(ch);
epg_channel_unlink(ch);
if (ch->ch_epg_parent) {
LIST_REMOVE(ch, ch_epg_slave_link);
LIST_SAFE_REMOVE(ch, ch_epg_slave_link);
free(ch->ch_epg_parent);
ch->ch_epg_parent = NULL;
}
for (ch1 = LIST_FIRST(&ch->ch_epg_slaves); ch1; ch1 = ch2) {
ch2 = LIST_NEXT(ch1, ch_epg_slave_link);
LIST_REMOVE(ch1, ch_epg_slave_link);
LIST_SAFE_REMOVE(ch1, ch_epg_slave_link);
if (delconf) {
free(ch1->ch_epg_parent);
ch1->ch_epg_parent = NULL;
Expand Down

0 comments on commit dc9238e

Please sign in to comment.