]> git.sesse.net Git - vlc/blobdiff - modules/demux/rawvid.c
Check malloc return value.
[vlc] / modules / demux / rawvid.c
index 9a9b0e5f7628d749a36e4238edafc09566485b88..add4213e0b12627334d2383119a72181ebc776f2 100644 (file)
@@ -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;