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:
44e6221
)
Do not malloc(0) - to make valgrind not report 0 byte leaks
author
Rafaël Carré
<funman@videolan.org>
Mon, 26 May 2008 08:25:47 +0000
(10:25 +0200)
committer
Rafaël Carré
<funman@videolan.org>
Mon, 26 May 2008 08:26:08 +0000
(10:26 +0200)
modules/demux/ts.c
patch
|
blob
|
history
diff --git
a/modules/demux/ts.c
b/modules/demux/ts.c
index
7dc07ad
..
c7c1447
100644
(file)
--- a/
modules/demux/ts.c
+++ b/
modules/demux/ts.c
@@
-3237,7
+3237,8
@@
static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
pid->es->fmt.i_cat = SPU_ES;
pid->es->fmt.i_codec = VLC_FOURCC( 't', 'e', 'l', 'x' );
pid->es->fmt.i_extra = p_dr->i_length;
- pid->es->fmt.p_extra = malloc( p_dr->i_length );
+ pid->es->fmt.p_extra = p_dr->i_length ?
+ malloc( p_dr->i_length ) : NULL;
if( pid->es->fmt.p_extra )
memcpy( pid->es->fmt.p_extra, p_dr->p_data,
p_dr->i_length );