Commit 85086925 authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/tables/*: initialize to NULL.

Initialize freed sections with dvbpsi_DeletePSISections() to NULL.
parent 0400d4db
......@@ -308,6 +308,7 @@ void dvbpsi_GatherCATSections(dvbpsi_t *p_dvbpsi,
p_cat_decoder->ap_sections[0]);
/* Delete the sections */
dvbpsi_DeletePSISections(p_cat_decoder->ap_sections[0]);
p_cat_decoder->ap_sections[0] = NULL;
/* signal the new CAT */
p_cat_decoder->pf_cat_callback(p_cat_decoder->p_cb_data,
p_cat_decoder->p_building_cat);
......
......@@ -460,6 +460,7 @@ void dvbpsi_GatherEITSections(dvbpsi_t *p_dvbpsi, void *p_private_decoder,
/* Delete the sections */
dvbpsi_DeletePSISections(p_eit_decoder->ap_sections[0]);
p_eit_decoder->ap_sections[0] = NULL;
/* signal the new EIT */
p_eit_decoder->pf_eit_callback(p_eit_decoder->p_cb_data, p_eit_decoder->p_building_eit);
......
......@@ -436,6 +436,7 @@ void dvbpsi_GatherNITSections(dvbpsi_t *p_dvbpsi,
p_nit_decoder->ap_sections[0]);
/* Delete the sections */
dvbpsi_DeletePSISections(p_nit_decoder->ap_sections[0]);
p_nit_decoder->ap_sections[0] = NULL;
/* signal the new NIT */
p_nit_decoder->pf_nit_callback(p_nit_decoder->p_cb_data,
p_nit_decoder->p_building_nit);
......
......@@ -339,6 +339,7 @@ void dvbpsi_GatherPATSections(dvbpsi_t* p_dvbpsi, dvbpsi_psi_section_t* p_sectio
p_pat_decoder->ap_sections[0]);
/* Delete the sections */
dvbpsi_DeletePSISections(p_pat_decoder->ap_sections[0]);
p_pat_decoder->ap_sections[0] = NULL;
/* signal the new PAT */
p_pat_decoder->pf_pat_callback(p_pat_decoder->p_cb_data,
p_pat_decoder->p_building_pat);
......
......@@ -402,6 +402,7 @@ void dvbpsi_GatherPMTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t* p_sectio
p_pmt_decoder->ap_sections[0]);
/* Delete the sections */
dvbpsi_DeletePSISections(p_pmt_decoder->ap_sections[0]);
p_pmt_decoder->ap_sections[0] = NULL;
/* signal the new PMT */
p_pmt_decoder->pf_pmt_callback(p_pmt_decoder->p_cb_data,
p_pmt_decoder->p_building_pmt);
......
......@@ -137,7 +137,10 @@ void dvbpsi_DetachSDT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
for (unsigned int i = 0; i <= 255; i++)
{
if (p_sdt_decoder->ap_sections[i])
{
dvbpsi_DeletePSISections(p_sdt_decoder->ap_sections[i]);
p_sdt_decoder->ap_sections[i] = NULL;
}
}
free(p_subdec->p_cb_data);
......@@ -409,6 +412,7 @@ void dvbpsi_GatherSDTSections(dvbpsi_t *p_dvbpsi,
p_sdt_decoder->ap_sections[0]);
/* Delete the sections */
dvbpsi_DeletePSISections(p_sdt_decoder->ap_sections[0]);
p_sdt_decoder->ap_sections[0] = NULL;
/* signal the new SDT */
p_sdt_decoder->pf_sdt_callback(p_sdt_decoder->p_cb_data,
p_sdt_decoder->p_building_sdt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment