Code

screen_browser: free temporary string
authorMax Kellermann <max@duempel.org>
Sun, 18 Oct 2009 18:53:20 +0000 (20:53 +0200)
committerMax Kellermann <max@duempel.org>
Sun, 18 Oct 2009 18:53:20 +0000 (20:53 +0200)
In browser_lw_callback(), free the converted directory base name.

src/screen_browser.c

index 45b782a079378b5d2c3fbe84cae10e211c727fd2..ed07b6957a0fbbaaf8f2ade06539c13d0d40d902 100644 (file)
@@ -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);