From: RĂ©mi Duraffort Date: Tue, 11 Mar 2008 19:42:28 +0000 (+0100) Subject: Check malloc return value. X-Git-Tag: 0.9.0-test0~2178 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=da686e46efe4a3085c7aa9286e0b2d55dbd1e918;p=vlc Check malloc return value. --- diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c index 9a9b0e5f76..add4213e0b 100644 --- a/modules/demux/rawvid.c +++ b/modules/demux/rawvid.c @@ -165,6 +165,9 @@ static int Open( vlc_object_t * p_this ) p_demux->pf_demux = Demux; p_demux->pf_control = Control; p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) ); + if( !p_sys ) + return VLC_EGENERIC; + p_sys->i_pcr = 1; p_sys->b_y4m = b_y4m;