From b9e06987c6dbbb96b5c7e8c67f29ad489f94f534 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 19 Nov 2008 00:06:46 +0100 Subject: [PATCH] screen_song: free the song pointer Fix a memory leak. --- src/screen_song.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/screen_song.c b/src/screen_song.c index 7dd9b57..202025e 100644 --- a/src/screen_song.c +++ b/src/screen_song.c @@ -35,6 +35,11 @@ screen_song_clear(void) g_free(g_ptr_array_index(current.lines, i)); g_ptr_array_set_size(current.lines, 0); + + if (current.song != NULL) { + mpd_freeSong(current.song); + current.song = NULL; + } } static void -- 2.30.2