diff src/view_file.c @ 1656:349ebc02b8e2

fixed leak in file_util_* functions - file_util_* are changed to take over the filelist and free it when done - make sure that these functions are called correctly
author nadvornik
date Sat, 20 Jun 2009 18:42:23 +0000
parents 58a5d1e01e33
children da8afd03152f
line wrap: on
line diff
--- a/src/view_file.c	Sat Jun 20 16:46:32 2009 +0000
+++ b/src/view_file.c	Sat Jun 20 18:42:23 2009 +0000
@@ -314,15 +314,12 @@
 {
 	ViewFile *vf;
 	const gchar *key = data;
-	GList *list;
 
 	vf = submenu_item_get_data(widget);
 
 	if (!vf) return;
 
-	list = vf_pop_menu_file_list(vf);
-	file_util_start_editor_from_filelist(key, list, vf->dir_fd->path, vf->listview);
-	filelist_free(list);
+	file_util_start_editor_from_filelist(key, vf_pop_menu_file_list(vf), vf->dir_fd->path, vf->listview);
 }
 
 static void vf_pop_menu_view_cb(GtkWidget *widget, gpointer data)
@@ -579,7 +576,7 @@
 		g_free(str_sel_mark_minus);
 		}
 
-	vf->editmenu_fd_list = vf_selection_get_list(vf);
+	vf->editmenu_fd_list = vf_pop_menu_file_list(vf);
 	submenu_add_edit(menu, &item, G_CALLBACK(vf_pop_menu_edit_cb), vf, vf->editmenu_fd_list);
 	gtk_widget_set_sensitive(item, active);