Commit 2aab2631 authored by Rémi Duraffort's avatar Rémi Duraffort

Check malloc return value.

parent aa5633ce
...@@ -578,6 +578,8 @@ static int DemuxOpen( vlc_object_t *p_this ) ...@@ -578,6 +578,8 @@ static int DemuxOpen( vlc_object_t *p_this )
int i; int i;
p_sys = (access_sys_t *)malloc( sizeof( access_sys_t ) ); p_sys = (access_sys_t *)malloc( sizeof( access_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
memset( p_sys, 0, sizeof( access_sys_t ) ); memset( p_sys, 0, sizeof( access_sys_t ) );
p_demux->p_sys = (demux_sys_t *)p_sys; p_demux->p_sys = (demux_sys_t *)p_sys;
...@@ -660,6 +662,8 @@ static int AccessOpen( vlc_object_t *p_this ) ...@@ -660,6 +662,8 @@ static int AccessOpen( vlc_object_t *p_this )
access_sys_t *p_sys; access_sys_t *p_sys;
p_access->p_sys = p_sys = (access_sys_t *)malloc( sizeof( access_sys_t ) ); p_access->p_sys = p_sys = (access_sys_t *)malloc( sizeof( access_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
memset( p_sys, 0, sizeof( access_sys_t ) ); memset( p_sys, 0, sizeof( access_sys_t ) );
if( CommonOpen( p_this, p_sys, false ) != VLC_SUCCESS ) if( CommonOpen( p_this, p_sys, false ) != VLC_SUCCESS )
......
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