From 3da600fbb0c33ec5cfb76e5341cf21c160592202 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 15 Sep 2008 13:27:33 +0200 Subject: [PATCH] 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. --- src/mpdclient.c | 2 ++ 1 file changed, 2 insertions(+) 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 */ -- 2.30.2