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 0529d75..daf6d22 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 830a0d1..7e5b001 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;