summaryrefslogtreecommitdiff
path: root/src/dlg-add-files.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-09-12 11:21:56 +0200
committerraveit65 <[email protected]>2019-09-22 02:44:09 +0200
commite5d2b428b86f3a09bbd035332698123971545d99 (patch)
treee22397390228d4b0099adf8ab64bd6bee67e4999 /src/dlg-add-files.c
parent68ef9e00239ad3f20f78fb4822446dce62d58bab (diff)
downloadengrampa-e5d2b428b86f3a09bbd035332698123971545d99.tar.bz2
engrampa-e5d2b428b86f3a09bbd035332698123971545d99.tar.xz
Use g_list_free_full and g_slist_free_full
void g_list_free_full (GList *list, GDestroyNotify free_func); void g_slist_free_full (GList *list, GDestroyNotify free_func); Convenience methods, which free all the memory used by a list, and calls free_func on every element's data.
Diffstat (limited to 'src/dlg-add-files.c')
-rw-r--r--src/dlg-add-files.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dlg-add-files.c b/src/dlg-add-files.c
index fed6ed8..add0a71 100644
--- a/src/dlg-add-files.c
+++ b/src/dlg-add-files.c
@@ -123,8 +123,7 @@ file_sel_response_cb (GtkWidget *widget,
fr_window_archive_add_files (window, item_list, update);
gio_file_list_free (item_list);
- g_slist_foreach (selections, (GFunc) g_free, NULL);
- g_slist_free (selections);
+ g_slist_free_full (selections, g_free);
g_free (current_folder);
gtk_widget_destroy (data->dialog);