summaryrefslogtreecommitdiff
path: root/eel
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 /eel
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 'eel')
-rw-r--r--eel/eel-glib-extensions.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/eel/eel-glib-extensions.c b/eel/eel-glib-extensions.c
index 5b016aad..ee108050 100644
--- a/eel/eel-glib-extensions.c
+++ b/eel/eel-glib-extensions.c
@@ -38,6 +38,8 @@
#include <time.h>
#include <locale.h>
+#include <src/glibcompat.h> /* for g_list_free_full */
+
/* Legal conversion specifiers, as specified in the C standard. */
#define C_STANDARD_STRFTIME_CHARACTERS "aAbBcdHIjmMpSUwWxXyYZ"
#define C_STANDARD_NUMERIC_STRFTIME_CHARACTERS "dHIjmMSUwWyY"
@@ -1034,16 +1036,11 @@ eel_self_check_glib_extensions (void)
EEL_CHECK_BOOLEAN_RESULT (eel_g_str_list_equal (compare_list_1, compare_list_4), FALSE);
EEL_CHECK_BOOLEAN_RESULT (eel_g_str_list_equal (compare_list_1, compare_list_5), FALSE);
- g_list_foreach (compare_list_1, (GFunc) g_free, NULL);
- g_list_free(compare_list_1);
- g_list_foreach (compare_list_2, (GFunc) g_free, NULL);
- g_list_free(compare_list_2);
- g_list_foreach (compare_list_3, (GFunc) g_free, NULL);
- g_list_free(compare_list_3);
- g_list_foreach (compare_list_4, (GFunc) g_free, NULL);
- g_list_free(compare_list_4);
- g_list_foreach (compare_list_5, (GFunc) g_free, NULL);
- g_list_free(compare_list_5);
+ g_list_free_full (compare_list_1, g_free);
+ g_list_free_full (compare_list_2, g_free);
+ g_list_free_full (compare_list_3, g_free);
+ g_list_free_full (compare_list_4, g_free);
+ g_list_free_full (compare_list_5, g_free);
/* eel_g_list_partition */