[vlc-devel] commit: Check a few mp4 mallocs. (Laurent Aimar )

Laurent Aimar fenrir at via.ecp.fr
Thu Aug 21 19:21:42 CEST 2008


On Thu, Aug 21, 2008, Rémi Denis-Courmont wrote:
> Le jeudi 21 août 2008 20:09:03 git version control, vous avez écrit :
> > vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Aug 21
> > 18:22:41 2008 +0200| [0bf165646d0dd39ad1bc698cdde0bbff1711e24d] |
> > committer: Laurent Aimar
> >
> > Check a few mp4 mallocs.
> >
> > > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0bf165646d0dd39ad1
> > >bc698cdde0bbff1711e24d
> >
> > ---
> >
> >  modules/demux/mp4/mp4.c |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
> > index ffd20f6..d84f4f0 100644
> > --- a/modules/demux/mp4/mp4.c
> > +++ b/modules/demux/mp4/mp4.c
> > @@ -1270,6 +1270,9 @@ static int TrackCreateSamplesIndex( demux_t *p_demux,
> >          ck->p_sample_count_dts = calloc( i_entry, sizeof( uint32_t ) );
> >          ck->p_sample_delta_dts = calloc( i_entry, sizeof( uint32_t ) );
> >
> > +        if( !ck->p_sample_count_dts || !ck->p_sample_delta_dts )
> > +            return VLC_ENOMEM;
> > +
> 
> Memory leaks?
Nope, MP4_TrackDestroy should take care of what is allocated.

-- 
fenrir




More information about the vlc-devel mailing list