Code

screen_browser: free g_path_get_dirname() return value
authorMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 14:28:56 +0000 (15:28 +0100)
committerMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 14:28:56 +0000 (15:28 +0100)
The function browser_change_directory() did not free the return value
of g_path_get_dirname().

src/screen_browser.c

index 26dca5285ac533d1f730bb389a3dbe6fed4b3a06..a09e2554ccd5ef48e67d95badbd191c9c727d264 100644 (file)
@@ -189,6 +189,7 @@ browser_change_directory(struct screen_browser *browser, mpdclient_t *c,
                        if( strcmp(parent, ".") == 0 )
                                parent[0] = '\0';
                        path = g_strdup(parent);
+                       g_free(parent);
                } else {
                        /* entry==NULL, then new_path ("" is root) */
                        path = g_strdup(new_path);