aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_print.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 23:28:19 +0200
committerMax Kellermann <max@duempel.org>2012-08-16 00:04:14 +0200
commit3b8532f3fb379c7ecc6b64eecbbf9c824d18e875 (patch)
tree3313a43df3f120b74166749fdd75b07fa89846ba /src/playlist_print.c
parentf45616e5f6f7d6aa0fb5ca90a0599eacddf1166b (diff)
downloadmpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.tar.gz
mpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.tar.xz
mpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.zip
DatabasePlugin: add method ReturnSong()
Allow the plugin to allocate the GetSong() return value.
Diffstat (limited to 'src/playlist_print.c')
-rw-r--r--src/playlist_print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/playlist_print.c b/src/playlist_print.c
index 204ce3582..b1b689893 100644
--- a/src/playlist_print.c
+++ b/src/playlist_print.c
@@ -127,6 +127,7 @@ spl_print(struct client *client, const char *name_utf8, bool detail,
struct song *song = db_get_song(temp);
if (song) {
song_print_info(client, song);
+ db_return_song(song);
wrote = true;
}
}
@@ -157,8 +158,7 @@ playlist_provider_print(struct client *client, const char *uri,
else
song_print_uri(client, song);
- if (!song_in_database(song) || song_is_detached(song))
- song_free(song);
+ song_free(song);
}
g_free(base_uri);