From e3d8f497baaf02daeddb060cd986681d0ee208de Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 17 Sep 2012 11:26:09 +0200 Subject: Fix history memory leak With `history = 0` playlist items are discarded, but not freed. --- src/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 174d144..f011c5a 100644 --- a/src/main.c +++ b/src/main.c @@ -301,6 +301,7 @@ static void BarMainLoop (BarApp_t *app) { if (app->playlist != NULL) { PianoSong_t *histsong = app->playlist; app->playlist = app->playlist->next; + histsong->next = NULL; BarUiHistoryPrepend (app, histsong); } if (app->playlist == NULL) { -- cgit v1.2.3