From da686e46efe4a3085c7aa9286e0b2d55dbd1e918 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Tue, 11 Mar 2008 20:42:28 +0100 Subject: [PATCH] Check malloc return value. --- modules/demux/rawvid.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2