]> git.sesse.net Git - vlc/blobdiff - src/playlist/engine.c
Avoid leaking input items
[vlc] / src / playlist / engine.c
index 444932d89ee9451b9ecdde081cb4fbf306dc4a0e..5dc8257afe33cb0891a2b4f66c3d697158e35574 100644 (file)
@@ -478,11 +478,9 @@ void playlist_LastLoop( playlist_t *p_playlist )
     playlist_MLDump( p_playlist );
 
     PL_LOCK;
-    /* Go through all items, and simply free everything without caring
-     * about the tree structure. Do not decref, it will be done by doing
-     * the same thing on the input items array */
     FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items )
         free( p_del->pp_children );
+        vlc_gc_decref( p_del->p_input );
         free( p_del );
     FOREACH_END();
     ARRAY_RESET( p_playlist->all_items );