# HG changeset patch # User William Pitcock # Date 1192789467 18000 # Node ID ddfe09d3cf86598b1dc322ca843ce02890b7d570 # Parent 48daf98313e05a7b645640879ef3b2f60049d3fc fix some memory leaks diff -r 48daf98313e0 -r ddfe09d3cf86 src/audacious/skin.c --- a/src/audacious/skin.c Fri Oct 19 04:39:49 2007 -0500 +++ b/src/audacious/skin.c Fri Oct 19 05:24:27 2007 -0500 @@ -1480,11 +1480,13 @@ gtk_settings_set_string_property(settings, "gtk-theme-name", basename(tmp), "audacious"); +#if 0 if (tmp_clean) { unlink(tmp); g_free(tmp); } +#endif } static gboolean @@ -1528,13 +1530,15 @@ skin_load_cursor(skin, path); - gtkrcpath = find_file_recursively(skin->path, "gtkrc"); +#ifndef _WIN32 + gtkrcpath = find_path_recursively(skin->path, "gtkrc"); -#ifndef _WIN32 /* the way GTK does things can be very broken. --nenolod */ if (gtkrcpath != NULL) { skin_set_gtk_theme(settings, skin, FALSE); } + + g_free(gtkrcpath); #endif return TRUE; @@ -1545,8 +1549,6 @@ return FALSE; } - gtkrcpath = find_file_recursively(skin->path, "gtkrc"); - /* Parse the hints for this skin. */ skin_parse_hints(skin, cpath); @@ -1560,10 +1562,14 @@ skin_load_cursor(skin, cpath); #ifndef _WIN32 + gtkrcpath = find_path_recursively(skin->path, "gtkrc"); + /* the way GTK does things can be very broken. --nenolod */ if (gtkrcpath != NULL) { skin_set_gtk_theme(settings, skin, TRUE); } + + g_free(gtkrcpath); #endif del_directory(cpath);