playlist: Fix an input_item leak in item.c, and notice that we are leaking one in...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 23 Dec 2007 15:29:47 +0000 (15:29 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 23 Dec 2007 15:29:47 +0000 (15:29 +0000)
src/playlist/item.c
src/playlist/loadsave.c

index cf2911e..58c7dfb 100644 (file)
@@ -295,6 +295,7 @@ int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
 
     i_ret = playlist_AddInput( p_playlist, p_input, i_mode, i_pos, b_playlist,
                                b_locked );
+    vlc_gc_decref( p_input );
     if( i_ret == VLC_SUCCESS )
         return p_input->i_id;
     return -1;
index bafc6b8..97dccca 100644 (file)
@@ -151,7 +151,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
         goto error;
 
     p_playlist->p_ml_onelevel->p_input =
-    p_playlist->p_ml_category->p_input = p_input;
+    p_playlist->p_ml_category->p_input = p_input; /* We leak that apparently */
 
     vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
                         input_item_subitem_added, p_playlist );