Changeset d04d403ae5256460589d7c35f52395161e7073b3

Show
Ignore:
Timestamp:
16/05/06 18:02:56 (3 years ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1147795376 +0000
git-parent:

[91b521689d016ee868fa30c9c820eac6f302307e]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1147795376 +0000
Message:

Fix potential segmentation fault

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/dv.c

    r4f15591 rd04d403  
    170170    p_sys->p_avc1394 = NULL; 
    171171    p_sys->p_frame = NULL; 
     172    p_sys->p_ev = NULL; 
    172173 
    173174    vlc_mutex_init( p_access, &p_sys->lock ); 
     
    230231    /* Now create our event thread catcher */ 
    231232    p_sys->p_ev = vlc_object_create( p_access, sizeof( event_thread_t ) ); 
     233    if( !p_sys->p_ev ) 
     234    { 
     235        msg_Err( p_access, "failed to create event thread for %s", psz_name ); 
     236        Close( p_this ); 
     237        free( psz_name ); 
     238        return VLC_EGENERIC; 
     239    } 
     240     
    232241    p_sys->p_ev->p_frame = NULL; 
    233242    p_sys->p_ev->pp_last = &p_sys->p_ev->p_frame;