From: Max Kellermann Date: Tue, 18 Nov 2008 23:06:46 +0000 (+0100) Subject: screen_song: free the song pointer X-Git-Tag: v0.12_beta1~31 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b9e06987c6dbbb96b5c7e8c67f29ad489f94f534;p=ncmpc.git screen_song: free the song pointer Fix a memory leak. --- 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