diff options
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_dvb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index 5204570c60..ccc77190de 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -426,7 +426,7 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type) void dvb_free_config(dvb_config_t *config) { - int i; + int i, j; for(i=0; i<config->count; i++) { @@ -436,8 +436,11 @@ void dvb_free_config(dvb_config_t *config) continue; if(config->cards[i].list->channels) { - if(config->cards[i].list->channels->name) - free(config->cards[i].list->channels->name); + for(j=0; j<config->cards[i].list->NUM_CHANNELS; j++) + { + if(config->cards[i].list->channels[j].name) + free(config->cards[i].list->channels[j].name); + } free(config->cards[i].list->channels); } free(config->cards[i].list); |