From 9a0647e0647d7530fb6db7d8c1647bffb420d08a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 18 Oct 2009 20:53:20 +0200 Subject: [PATCH] screen_browser: free temporary string In browser_lw_callback(), free the converted directory base name. --- src/screen_browser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/screen_browser.c b/src/screen_browser.c index 45b782a..ed07b69 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -99,6 +99,7 @@ browser_lw_callback(unsigned idx, void *data) mpd_entity_get_directory(entity); char *directory = utf8_to_locale(g_basename(mpd_directory_get_path(dir))); g_strlcpy(buf, directory, sizeof(buf)); + g_free(directory); return buf; } else if (mpd_entity_get_type(entity) == MPD_ENTITY_TYPE_SONG) { const struct mpd_song *song = mpd_entity_get_song(entity); -- 2.30.2