aboutsummaryrefslogtreecommitdiffstats
path: root/src/mpdclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mpdclient.c')
-rw-r--r--src/mpdclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mpdclient.c b/src/mpdclient.c
index f67b09133..469c794c6 100644
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
@@ -459,7 +459,7 @@ mpdclient_cmd_delete(mpdclient_t *c, gint idx)
c->playlist.id++;
/* remove the song from the playlist */
- playlist_remove(&c->playlist, idx);
+ playlist_remove_reuse(&c->playlist, idx);
/* call playlist updated callback */
mpdclient_playlist_callback(c, PLAYLIST_EVENT_DELETE, (gpointer) song);
@@ -470,6 +470,8 @@ mpdclient_cmd_delete(mpdclient_t *c, gint idx)
c->need_update = TRUE;
}
+ mpd_freeSong(song);
+
#else
c->need_update = TRUE;
#endif