Commit e8120e68 authored by Rafaël Carré's avatar Rafaël Carré

Check allocation and initialise memory

parent 27965f62
...@@ -164,6 +164,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -164,6 +164,9 @@ static int Open( vlc_object_t *p_this )
p_dec->pf_get_cc = GetCc; p_dec->pf_get_cc = GetCc;
p_dec->p_sys = p_sys = malloc( sizeof( decoder_sys_t ) ); p_dec->p_sys = p_sys = malloc( sizeof( decoder_sys_t ) );
if( !p_dec->p_sys )
return VLC_ENOMEM;
memset( p_dec->p_sys, 0, sizeof( decoder_sys_t ) );
/* Misc init */ /* Misc init */
p_sys->i_state = STATE_NOSYNC; p_sys->i_state = STATE_NOSYNC;
......
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