From: Max Kellermann Date: Sun, 18 Oct 2009 18:53:20 +0000 (+0200) Subject: screen_browser: free temporary string X-Git-Tag: release-0.16~76 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9a0647e0647d7530fb6db7d8c1647bffb420d08a;p=ncmpc.git screen_browser: free temporary string In browser_lw_callback(), free the converted directory base name. --- 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);