summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-search-engine-simple.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-23 03:09:17 -0800
committerStefano Karapetsas <[email protected]>2012-11-23 03:09:17 -0800
commitf6f5c1bb6d060aff5fb334017c640733675c2ae2 (patch)
treecde88ea4e11a2f0809da857feaefa6824d4ba8fa /libcaja-private/caja-search-engine-simple.c
parentcbfe84ee50d01e523472a8e086add01245fad6bb (diff)
parentae06676815e24a27549e0c79a74bc81c77822554 (diff)
downloadcaja-f6f5c1bb6d060aff5fb334017c640733675c2ae2.tar.bz2
caja-f6f5c1bb6d060aff5fb334017c640733675c2ae2.tar.xz
Merge pull request #56 from jasmineaura/develop
[all] add and use glibcompat.h for glib-2.27.2 forward-compat
Diffstat (limited to 'libcaja-private/caja-search-engine-simple.c')
-rw-r--r--libcaja-private/caja-search-engine-simple.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libcaja-private/caja-search-engine-simple.c b/libcaja-private/caja-search-engine-simple.c
index cf50497f..dc30dbe8 100644
--- a/libcaja-private/caja-search-engine-simple.c
+++ b/libcaja-private/caja-search-engine-simple.c
@@ -30,6 +30,8 @@
#include <eel/eel-gtk-macros.h>
#include <gio/gio.h>
+#include <src/glibcompat.h> /* for g_list_free_full */
+
#define BATCH_SIZE 500
typedef struct
@@ -137,10 +139,8 @@ search_thread_data_free (SearchThreadData *data)
g_hash_table_destroy (data->visited);
g_object_unref (data->cancellable);
g_strfreev (data->words);
- g_list_foreach(data->mime_types, (GFunc) g_free, NULL);
- g_list_free(data->mime_types);
- g_list_foreach(data->uri_hits, (GFunc) g_free, NULL);
- g_list_free(data->uri_hits);
+ g_list_free_full (data->mime_types, g_free);
+ g_list_free_full (data->uri_hits, g_free);
g_free (data);
}
@@ -182,8 +182,7 @@ search_thread_add_hits_idle (gpointer user_data)
hits->uris);
}
- g_list_foreach(hits->uris, (GFunc) g_free, NULL);
- g_list_free(hits->uris);
+ g_list_free_full (hits->uris, g_free);
g_free (hits);
return FALSE;