From: Max Kellermann Date: Mon, 15 Sep 2008 11:27:33 +0000 (+0200) Subject: free info entity while iterating X-Git-Tag: v0.12_alpha1~306 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3da600fbb0c33ec5cfb76e5341cf21c160592202;p=ncmpc.git free info entity while iterating Memory leak: the function mpdclient_playlist_update_changes() did not free the entity which was returned by mpd_getNextInfoEntity(). Add a mpd_freeInfoEntity() call at the end of each iteration. --- diff --git a/src/mpdclient.c b/src/mpdclient.c index 57b4706..c597411 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -753,6 +753,8 @@ mpdclient_playlist_update_changes(mpdclient_t *c) c->playlist.list = g_list_append(c->playlist.list, (gpointer)mpd_songDup(song)); } + + mpd_freeInfoEntity(entity); } /* remove trailing songs */