aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-util.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-05 20:55:12 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-05 20:55:12 +0800
commitaed824675f0cc43c90c43d6a0495ee952ed3a648 (patch)
tree64b8125095257aabc982c9fcf8a72494e63c9132 /e-util/e-util.c
parenta98080fbbd0b8e9ee2d0d32dc4a9f6e3b2f01f11 (diff)
downloadgsoc2013-evolution-aed824675f0cc43c90c43d6a0495ee952ed3a648.tar.gz
gsoc2013-evolution-aed824675f0cc43c90c43d6a0495ee952ed3a648.tar.zst
gsoc2013-evolution-aed824675f0cc43c90c43d6a0495ee952ed3a648.zip
** Fix for bug #492692
2007-11-05 Milan Crha <mcrha@redhat.com> ** Fix for bug #492692 * e-util.c: (e_str_case_compare): Leak fix. svn path=/trunk/; revision=34513
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r--e-util/e-util.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 05bfdb4c0f..c27e2a60d8 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -98,14 +98,25 @@ e_str_compare (gconstpointer x, gconstpointer y)
gint
e_str_case_compare (gconstpointer x, gconstpointer y)
{
+ gchar *cx, *cy;
+ gint res;
+
if (x == NULL || y == NULL) {
if (x == y)
return 0;
else
return x ? -1 : 1;
}
-
- return g_utf8_collate (g_utf8_casefold (x, -1), g_utf8_casefold (y, -1));
+
+ cx = g_utf8_casefold (x, -1);
+ cy = g_utf8_casefold (y, -1);
+
+ res = g_utf8_collate (cx, cy);
+
+ g_free (cx);
+ g_free (cy);
+
+ return res;
}
gint