10l, in dvb_free_config() channels' names must be free individually

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25417 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2007-12-15 21:06:58 +00:00
parent e25991774e
commit 1fd25fed63
1 changed files with 6 additions and 3 deletions

View File

@ -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);