playlist/tree.c: Fix an input_item leak.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 23 Dec 2007 15:28:51 +0000 (15:28 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 23 Dec 2007 15:28:51 +0000 (15:28 +0000)
src/playlist/tree.c

index 94e5871..755d297 100644 (file)
@@ -65,6 +65,8 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
                                         psz_name, 0, NULL, -1, ITEM_TYPE_NODE );
     p_item = playlist_ItemNewFromInput( VLC_OBJECT(p_playlist),
                                         p_input ? p_input : p_new_input );
+    if( !p_input )
+        vlc_gc_decref( p_new_input );
 
     if( p_item == NULL )  return NULL;
     p_item->i_children = 0;