I forgot to free the arrays.

parent 0ee0fc09
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pat.c: PAT decoder/generator * pat.c: PAT decoder/generator
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: pat.c,v 1.1 2002/01/22 20:30:16 bozo Exp $ * $Id: pat.c,v 1.2 2002/01/22 23:28:17 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -91,9 +91,16 @@ void dvbpsi_DetachPAT(dvbpsi_handle h_dvbpsi) ...@@ -91,9 +91,16 @@ void dvbpsi_DetachPAT(dvbpsi_handle h_dvbpsi)
{ {
dvbpsi_pat_decoder_t* p_pat_decoder dvbpsi_pat_decoder_t* p_pat_decoder
= (dvbpsi_pat_decoder_t*)h_dvbpsi->p_private_decoder; = (dvbpsi_pat_decoder_t*)h_dvbpsi->p_private_decoder;
unsigned int i;
free(p_pat_decoder->p_building_pat); free(p_pat_decoder->p_building_pat);
for(i = 0; i <= 255; i++)
{
if(p_pat_decoder->ap_sections[i])
free(p_pat_decoder->ap_sections[i]);
}
free(h_dvbpsi->p_private_decoder); free(h_dvbpsi->p_private_decoder);
free(h_dvbpsi); free(h_dvbpsi);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pmt.c: PMT decoder/generator * pmt.c: PMT decoder/generator
*---------------------------------------------------------------------------- *----------------------------------------------------------------------------
* (c)2001-2002 VideoLAN * (c)2001-2002 VideoLAN
* $Id: pmt.c,v 1.1 2002/01/22 20:30:16 bozo Exp $ * $Id: pmt.c,v 1.2 2002/01/22 23:28:17 bozo Exp $
* *
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* *
...@@ -95,9 +95,16 @@ void dvbpsi_DetachPMT(dvbpsi_handle h_dvbpsi) ...@@ -95,9 +95,16 @@ void dvbpsi_DetachPMT(dvbpsi_handle h_dvbpsi)
{ {
dvbpsi_pmt_decoder_t* p_pmt_decoder dvbpsi_pmt_decoder_t* p_pmt_decoder
= (dvbpsi_pmt_decoder_t*)h_dvbpsi->p_private_decoder; = (dvbpsi_pmt_decoder_t*)h_dvbpsi->p_private_decoder;
unsigned int i;
free(p_pmt_decoder->p_building_pmt); free(p_pmt_decoder->p_building_pmt);
for(i = 0; i <= 255; i++)
{
if(p_pmt_decoder->ap_sections[i])
free(p_pmt_decoder->ap_sections[i]);
}
free(h_dvbpsi->p_private_decoder); free(h_dvbpsi->p_private_decoder);
free(h_dvbpsi); free(h_dvbpsi);
} }
......
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