mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
Check allocation and initialise memory
This commit is contained in:
parent
27965f62a1
commit
e8120e68db
@ -164,6 +164,9 @@ static int Open( vlc_object_t *p_this )
|
||||
p_dec->pf_get_cc = GetCc;
|
||||
|
||||
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 */
|
||||
p_sys->i_state = STATE_NOSYNC;
|
||||
|
Loading…
Reference in New Issue
Block a user