Changeset cf5667bd8ce8bfd6c99c55a225361a2af1539b30

Show
Ignore:
Timestamp:
31/03/08 22:43:21 (6 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1206996201 +0200
git-parent:

[fdf1b8af4e8cd13f7c33a5994a7301b9ab7e9d4c]

git-author:
Rafaël Carré <funman@videolan.org> 1206996201 +0200
Message:

Avoid leaking input items

Files:

Legend:

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

    r719f576 rcf5667b  
    479479 
    480480    PL_LOCK; 
    481     /* Go through all items, and simply free everything without caring 
    482      * about the tree structure. Do not decref, it will be done by doing 
    483      * the same thing on the input items array */ 
    484481    FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items ) 
    485482        free( p_del->pp_children ); 
     483        vlc_gc_decref( p_del->p_input ); 
    486484        free( p_del ); 
    487485    FOREACH_END(); 
  • src/playlist/loadsave.c

    r0e86a35 rcf5667b  
    152152    p_playlist->p_ml_category->p_input = p_input; 
    153153 
     154    vlc_gc_incref( p_input ); 
     155 
    154156    vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded, 
    155157                        input_item_subitem_added, p_playlist ); 
     
    195197    playlist_Export( p_playlist, psz_dirname, p_playlist->p_ml_category, 
    196198                     "export-xspf" ); 
    197     vlc_gc_decref( p_playlist->p_ml_category->p_input ); 
    198199    stats_TimerStop( p_playlist, STATS_TIMER_ML_DUMP ); 
    199200