Commit 469dc547 authored by Laurent Aimar's avatar Laurent Aimar

Fixed double free.

parent 7976ebd1
...@@ -1562,15 +1562,15 @@ static void PIDInit( ts_pid_t *pid, bool b_psi, ts_psi_t *p_owner ) ...@@ -1562,15 +1562,15 @@ static void PIDInit( ts_pid_t *pid, bool b_psi, ts_psi_t *p_owner )
if( !b_old_valid ) if( !b_old_valid )
{ {
free( pid->psi );
pid->psi = malloc( sizeof( ts_psi_t ) ); pid->psi = malloc( sizeof( ts_psi_t ) );
if( pid->psi ) if( pid->psi )
{ {
pid->psi->handle= NULL; pid->psi->handle = NULL;
pid->psi->i_prg = 0; TAB_INIT( pid->psi->i_prg, pid->psi->prg );
pid->psi->prg = NULL;
} }
} }
assert( pid->psi );
pid->psi->i_pat_version = -1; pid->psi->i_pat_version = -1;
pid->psi->i_sdt_version = -1; pid->psi->i_sdt_version = -1;
if( p_owner ) if( p_owner )
...@@ -3186,7 +3186,7 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt ) ...@@ -3186,7 +3186,7 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
* parsing the SDT/EDT */ * parsing the SDT/EDT */
dvbpsi_DetachDemux( pid->psi->handle ); dvbpsi_DetachDemux( pid->psi->handle );
free( pid->psi ); free( pid->psi );
pid->psi = 0; pid->psi = NULL;
} }
else else
{ {
......
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