mpd: fix memory leak added by 67550d460

This commit is contained in:
Andrzej Rybczak
2014-08-26 23:09:03 +02:00
parent 8db4b668ef
commit afd5c22acf

View File

@@ -721,6 +721,7 @@ void Connection::GetDirectoryRecursive(const std::string &directory, SongConsume
while (mpd_entity *e = mpd_recv_entity(m_connection)) {
if (mpd_entity_get_type(e) == MPD_ENTITY_TYPE_SONG)
f(Song(mpd_song_dup(mpd_entity_get_song(e))));
mpd_entity_free(e);
}
mpd_response_finish(m_connection);
checkErrors();