From 445bd706af67452a53c2ca2caa091ecfb83b5128 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 17 Nov 2013 10:55:44 -0200 Subject: [PATCH] libdvbv5/dvb-scan-table-handler: remove free of unallocated structs While those old structs are still part of struct dvb_v5_descriptors, they are not allocated anymore. So, we don't need to fix them. Get rid of those structs. We can't remove them from the main struct yet, as dvb-file and dvbv5-scan still use. Signed-off-by: Mauro Carvalho Chehab --- lib/libdvbv5/dvb-scan-table-handler.c | 43 ----------------------------------- 1 file changed, 43 deletions(-) diff --git a/lib/libdvbv5/dvb-scan-table-handler.c b/lib/libdvbv5/dvb-scan-table-handler.c index f45a1ca..ecd8b15 100644 --- a/lib/libdvbv5/dvb-scan-table-handler.c +++ b/lib/libdvbv5/dvb-scan-table-handler.c @@ -68,51 +68,8 @@ struct dvb_v5_descriptors *dvb_scan_alloc_handler_table(uint32_t delivery_system void dvb_scan_free_handler_table(struct dvb_v5_descriptors *dvb_scan_handler) { - struct pat_table *pat_table = &dvb_scan_handler->pat_table; - struct pid_table *pid_table = dvb_scan_handler->pat_table.pid_table; - struct nit_table *nit_table = &dvb_scan_handler->nit_table; - struct sdt_table *sdt_table = &dvb_scan_handler->sdt_table; int i; - if (pid_table) { - for (i = 0; i < pat_table->pid_table_len; i++) { - if (pid_table[i].video_pid) - free(pid_table[i].video_pid); - if (pid_table[i].audio_pid) - free(pid_table[i].audio_pid); - if (pid_table[i].other_el_pid) - free(pid_table[i].other_el_pid); - } - free(pid_table); - } - - if (nit_table->lcn) - free(nit_table->lcn); - if (nit_table->network_name) - free(nit_table->network_name); - if (nit_table->network_alias) - free(nit_table->network_alias); - if (nit_table->tr_table) - free(nit_table->tr_table); - if (nit_table->frequency) - free(nit_table->frequency); - if (nit_table->orbit) - free(nit_table->orbit); - - if (sdt_table->service_table) { - for (i = 0; i < sdt_table->service_table_len; i++) { - if (sdt_table->service_table[i].provider_name) - free(sdt_table->service_table[i].provider_name); - if (sdt_table->service_table[i].provider_alias) - free(sdt_table->service_table[i].provider_alias); - if (sdt_table->service_table[i].service_name) - free(sdt_table->service_table[i].service_name); - if (sdt_table->service_table[i].service_alias) - free(sdt_table->service_table[i].service_alias); - } - free(sdt_table->service_table); - } - if (dvb_scan_handler->pat) dvb_table_pat_free(dvb_scan_handler->pat); if (dvb_scan_handler->vct) -- 2.7.4