diff audacious/playlist.c @ 2142:959722e6e277 trunk

[svn] - clear and free a playlist passed to playlist_remove_playlist
author giacomo
date Sat, 16 Dec 2006 05:41:27 -0800
parents 06a86fdd4fb7
children f7eeb54c6467
line wrap: on
line diff
--- a/audacious/playlist.c	Sat Dec 16 05:18:19 2006 -0800
+++ b/audacious/playlist.c	Sat Dec 16 05:41:27 2006 -0800
@@ -240,7 +240,10 @@
 void
 playlist_remove_playlist(Playlist *playlist)
 {
+    /* upon removal, a playlist should be cleared and freed */
     playlists = g_list_remove(playlists, playlist);
+    playlist_clear(playlist);
+    playlist_free(playlist);
 
     if (playlists_iter == NULL)
         playlists_iter = playlists;