Commit 16224f69 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

DV: check return of vlc_clone

parent 3da4a170
...@@ -206,17 +206,22 @@ static int Open( vlc_object_t *p_this ) ...@@ -206,17 +206,22 @@ static int Open( vlc_object_t *p_this )
p_sys->p_ev = calloc( 1, sizeof( *p_sys->p_ev ) ); p_sys->p_ev = calloc( 1, sizeof( *p_sys->p_ev ) );
if( !p_sys->p_ev ) if( !p_sys->p_ev )
{ {
msg_Err( p_access, "failed to create event thread" ); msg_Err( p_access, "failed to create event thread struct" );
Close( p_this ); Close( p_this );
return VLC_EGENERIC; return VLC_ENOMEM;
} }
p_sys->p_ev->p_frame = NULL; p_sys->p_ev->p_frame = NULL;
p_sys->p_ev->pp_last = &p_sys->p_ev->p_frame; p_sys->p_ev->pp_last = &p_sys->p_ev->p_frame;
p_sys->p_ev->p_access = p_access; p_sys->p_ev->p_access = p_access;
vlc_mutex_init( &p_sys->p_ev->lock ); vlc_mutex_init( &p_sys->p_ev->lock );
vlc_clone( &p_sys->p_ev->thread, Raw1394EventThread, if( vlc_clone( &p_sys->p_ev->thread, Raw1394EventThread,
p_sys->p_ev, VLC_THREAD_PRIORITY_OUTPUT ); p_sys->p_ev, VLC_THREAD_PRIORITY_OUTPUT ) )
{
msg_Err( p_access, "failed to clone event thread" );
Close( p_this );
return VLC_EGENERIC;
}
return VLC_SUCCESS; return 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