]> git.sesse.net Git - vlc/commitdiff
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 94e587141065114c3756b4be63212d835d2dd160..755d297f2fde0b014f90237a199779b0c3eab4b0 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;