summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-tree-view.c
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-23 11:18:34 +0200
committerJasmine Hassan <[email protected]>2012-11-23 11:18:34 +0200
commitb00cccb74307a49df74deb785936e3cd9cf3a5ad (patch)
treef2bcc459a2bef12678e642d0a14ce7f02373b71d /src/file-manager/fm-tree-view.c
parentb12a7f6ea3309ecddfc7e3ae839a7b558c862533 (diff)
downloadcaja-b00cccb74307a49df74deb785936e3cd9cf3a5ad.tar.bz2
caja-b00cccb74307a49df74deb785936e3cd9cf3a5ad.tar.xz
[all] include src/glibcompat.h & use g_list_free_full() where needed
Also fixes a double-free regression in lc-p/caja-query from 7a42b9b0
Diffstat (limited to 'src/file-manager/fm-tree-view.c')
-rw-r--r--src/file-manager/fm-tree-view.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c
index 37559f53..32053db3 100644
--- a/src/file-manager/fm-tree-view.c
+++ b/src/file-manager/fm-tree-view.c
@@ -55,6 +55,8 @@
#include <libcaja-private/caja-window-info.h>
#include <libcaja-private/caja-window-slot-info.h>
+#include <src/glibcompat.h> /* for g_list_free_full */
+
typedef struct
{
GObject parent;
@@ -1059,8 +1061,7 @@ paste_clipboard_data (FMTreeView *view,
gtk_clipboard_clear (caja_clipboard_get (GTK_WIDGET (view)));
}
- g_list_foreach(item_uris, (GFunc) g_free, NULL);
- g_list_free(item_uris);
+ g_list_free_full (item_uris, g_free);
}
}
@@ -1123,8 +1124,7 @@ fm_tree_view_trash_cb (GtkWidget *menu_item,
caja_file_operations_trash_or_delete (list,
fm_tree_view_get_containing_window (view),
NULL, NULL);
- g_list_foreach(list, (GFunc) g_object_unref, NULL);
- g_list_free(list);
+ g_list_free_full (list, g_free);
}
static void
@@ -1142,8 +1142,7 @@ fm_tree_view_delete_cb (GtkWidget *menu_item,
caja_file_get_location (view->details->popup_file));
caja_file_operations_delete (location_list, fm_tree_view_get_containing_window (view), NULL, NULL);
- g_list_foreach(location_list, (GFunc) g_object_unref, NULL);
- g_list_free(location_list);
+ g_list_free_full (location_list, g_object_unref);
}
static void