changeset 25389:cd65c1242675

10l, in dvb_free_config() channels' names must be free individually
author nicodvb
date Sat, 15 Dec 2007 21:06:58 +0000
parents 57c207e33831
children a357a420c04d
files stream/stream_dvb.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvb.c	Sat Dec 15 19:17:36 2007 +0000
+++ b/stream/stream_dvb.c	Sat Dec 15 21:06:58 2007 +0000
@@ -426,7 +426,7 @@
 
 void dvb_free_config(dvb_config_t *config)
 {
-	int i;
+	int i, j;
 
 	for(i=0; i<config->count; i++) 
 	{
@@ -436,8 +436,11 @@
 			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);