]> git.sesse.net Git - vlc/commitdiff
playlist: Correctly decref where we use the object.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 1 Apr 2008 19:44:33 +0000 (21:44 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 1 Apr 2008 19:44:33 +0000 (21:44 +0200)
src/playlist/engine.c
src/playlist/loadsave.c

index 0529d75ade3fc20f84b9dbc1c2903c25e9816ea5..daf6d22bd713bfc622e5f3e1c1e11b27434a94f3 100644 (file)
@@ -398,8 +398,6 @@ check_input:
 
 static void ML_Decref( playlist_item_t *p_node )
 {
-    vlc_gc_decref( p_node->p_input );
-
     int i;
     if( p_node->i_children > 0 )
         for( i = 0 ; i < p_node->i_children ; i++ )
index 830a0d167598560c757a88847edf4b997814774b..7e5b001fb9dc03f7756e50ddc8647eeaef69b419 100644 (file)
@@ -180,6 +180,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
     vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,
                         input_item_subitem_added, p_playlist );
 
+    vlc_gc_decref( p_input );
     free( psz_uri );
     return VLC_SUCCESS;