Changeset 2cc99c5cbbd3de7f5ad677539af1b5c29dc8defe

Show
Ignore:
Timestamp:
05/12/08 14:48:45 (2 months ago)
Author:
Rémi Duraffort <ivoire@videolan.org>
git-committer:
Rémi Duraffort <ivoire@videolan.org> 1210596525 +0200
git-parent:

[83fb33511475ce86a30d565e8f925830784d54b3]

git-author:
Rémi Duraffort <ivoire@videolan.org> 1210596525 +0200
Message:

Avoid a potential segfault as vlc_object_create can fail.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/playlist/thread.c

    r7bc28ee r2cc99c5  
    6262    p_playlist->p_preparse = vlc_object_create( p_playlist, 
    6363                                  sizeof( playlist_preparse_t ) ); 
    64     p_playlist->p_preparse->psz_object_name = strdup( "preparser" ); 
    6564    if( !p_playlist->p_preparse ) 
    6665    { 
     
    6968        return; 
    7069    } 
     70    p_playlist->p_preparse->psz_object_name = strdup( "preparser" ); 
    7171    p_playlist->p_preparse->i_waiting = 0; 
    7272    p_playlist->p_preparse->pp_waiting = NULL; 
     
    8686    p_playlist->p_fetcher = vlc_object_create( p_playlist, 
    8787                              sizeof( playlist_fetcher_t ) ); 
    88     p_playlist->p_fetcher->psz_object_name = strdup( "fetcher" ); 
    8988    if( !p_playlist->p_fetcher ) 
    9089    { 
     
    9392        return; 
    9493    } 
     94    p_playlist->p_fetcher->psz_object_name = strdup( "fetcher" ); 
    9595    p_playlist->p_fetcher->i_waiting = 0; 
    9696    p_playlist->p_fetcher->pp_waiting = NULL;