Commit ab734ace authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Check return value of malloc()

parent 30d0645a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* demux.c: demuxer using ffmpeg (libavformat). * demux.c: demuxer using ffmpeg (libavformat).
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 the VideoLAN team * Copyright (C) 2004 the VideoLAN team
* $Id$ * $Id: 95d2460bf93b85608fa27565f1475aadd8a57360 $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@videolan.org> * Gildas Bazin <gbazin@videolan.org>
...@@ -142,6 +142,8 @@ int E_(OpenDemux)( vlc_object_t *p_this ) ...@@ -142,6 +142,8 @@ int E_(OpenDemux)( vlc_object_t *p_this )
p_demux->pf_demux = Demux; p_demux->pf_demux = Demux;
p_demux->pf_control = Control; p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) ); p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
p_sys->ic = 0; p_sys->ic = 0;
p_sys->fmt = fmt; p_sys->fmt = fmt;
p_sys->i_tk = 0; p_sys->i_tk = 0;
......
...@@ -164,7 +164,6 @@ int E_(OpenCropPadd)( vlc_object_t *p_this ) ...@@ -164,7 +164,6 @@ int E_(OpenCropPadd)( vlc_object_t *p_this )
return OpenFilterEx( p_this, VLC_TRUE ); return OpenFilterEx( p_this, VLC_TRUE );
} }
/***************************************************************************** /*****************************************************************************
* CloseFilter: clean up the filter * CloseFilter: clean up the filter
*****************************************************************************/ *****************************************************************************/
......
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