enchant/enchant-1.5.0-abi12173.leaks.patch
2009-07-02 12:49:10 +00:00

49 lines
1.5 KiB
Diff

diff -ru enchant-1.4.2.orig/src/enchant.c enchant-1.4.2/src/enchant.c
--- enchant-1.4.2.orig/src/enchant.c 2009-06-29 17:47:11.000000000 +0100
+++ enchant-1.4.2/src/enchant.c 2009-06-29 20:46:17.000000000 +0100
@@ -1543,11 +1544,13 @@
EnchantDict *dict;
EnchantProvider *owner;
EnchantSession *session;
+ EnchantDictPrivateData *enchant_dict_private_data;
g_return_if_fail (data);
dict = (EnchantDict *) data;
- session = ((EnchantDictPrivateData*)dict->enchant_private_data)->session;
+ enchant_dict_private_data = (EnchantDictPrivateData*)dict->enchant_private_data;
+ session = enchant_dict_private_data->session;
owner = session->provider;
if (owner && owner->dispose_dict)
@@ -1555,6 +1558,8 @@
else if(session->is_pwl)
g_free (dict);
+ g_free(enchant_dict_private_data);
+
enchant_session_destroy (session);
}
diff -ru enchant-1.4.2.orig/tests/enchant-ispell.c enchant-1.4.2/tests/enchant-ispell.c
--- enchant-1.4.2.orig/tests/enchant-ispell.c 2009-06-29 17:47:11.000000000 +0100
+++ enchant-1.4.2/tests/enchant-ispell.c 2009-06-29 20:45:29.000000000 +0100
@@ -431,6 +431,8 @@
do_mode_a (out, dict, word, pos, lineCount);
else if (mode == MODE_L)
do_mode_l (out, dict, word, lineCount);
+
+ g_string_free(word, TRUE);
}
if (token_ptr)
g_slist_free (token_ptr);
@@ -446,8 +448,6 @@
enchant_broker_free_dict (broker, dict);
enchant_broker_free (broker);
- if (word)
- g_string_free (word, TRUE);
g_string_free (str, TRUE);
return 0;