git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7976ebd
)
Fixed double free.
author
Laurent Aimar
<fenrir@videolan.org>
Thu, 20 Nov 2008 19:12:51 +0000
(20:12 +0100)
committer
Laurent Aimar
<fenrir@videolan.org>
Thu, 20 Nov 2008 19:12:51 +0000
(20:12 +0100)
modules/demux/ts.c
patch
|
blob
|
history
diff --git
a/modules/demux/ts.c
b/modules/demux/ts.c
index
7394db2
..
9a195ed
100644
(file)
--- a/
modules/demux/ts.c
+++ b/
modules/demux/ts.c
@@
-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 ) );
if( pid->psi )
{
pid->psi = malloc( sizeof( ts_psi_t ) );
if( pid->psi )
{
- pid->psi->handle= NULL;
- pid->psi->i_prg = 0;
- pid->psi->prg = NULL;
+ pid->psi->handle = NULL;
+ TAB_INIT( pid->psi->i_prg, pid->psi->prg );
}
}
}
}
+ assert( pid->psi );
+
pid->psi->i_pat_version = -1;
pid->psi->i_sdt_version = -1;
if( p_owner )
pid->psi->i_pat_version = -1;
pid->psi->i_sdt_version = -1;
if( p_owner )
@@
-3186,7
+3186,7
@@
static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
* parsing the SDT/EDT */
dvbpsi_DetachDemux( pid->psi->handle );
free( pid->psi );
* parsing the SDT/EDT */
dvbpsi_DetachDemux( pid->psi->handle );
free( pid->psi );
- pid->psi =
0
;
+ pid->psi =
NULL
;
}
else
{
}
else
{