Mercurial > audlegacy
diff audacious/util.c @ 1752:be1c5774f675 trunk
[svn] - fix a memory leak in util_run_filebrowser()
author | nenolod |
---|---|
date | Wed, 20 Sep 2006 01:13:06 -0700 |
parents | 837983bac90f |
children | aceb472cce6c |
line wrap: on
line diff
--- a/audacious/util.c Wed Sep 20 01:08:15 2006 -0700 +++ b/audacious/util.c Wed Sep 20 01:13:06 2006 -0700 @@ -1007,10 +1007,14 @@ g_signal_handler_disconnect(chooser, handlerid_activate); g_signal_handler_disconnect(button_add, handlerid_do); g_signal_handler_disconnect(chooser, handlerid_do_activate); - if (cfg.refresh_file_list) { - // *sigh* force a refresh - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser),gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(chooser))); - } + + if (cfg.refresh_file_list) + { + gchar *tmp = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(chooser)); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), tmp); + + g_free(tmp); + } } if (play_button) {