Revision: 7320
Author: nogu.dev
Date: Sun Sep 18 23:31:57 2011
Log: * gtk2/dict/canna.c
- (parse_canna_priv_dic_buf): Check if "p" is NULL.
- (uim_dict_canna_open): Plug leak.
* gtk2/dict/word-win-gtk.c
- (word_window_add): free "word" with free() instead of g_free()
because "word" is allocated with malloc().
http://code.google.com/p/uim/source/detail?r=7320
Modified:
/trunk/gtk2/dict/canna.c
/trunk/gtk2/dict/word-win-gtk.c
=======================================
--- /trunk/gtk2/dict/canna.c Sun Jun 12 05:53:15 2011
+++ /trunk/gtk2/dict/canna.c Sun Sep 18 23:31:57 2011
@@ -158,6 +158,8 @@
phon = strdup(buf);
for (;;) {
+ if (!p)
+ break;
q = strchr(p, ' ');
if (q) {
*q = '\0';
@@ -309,6 +311,8 @@
if (status == -2) {
if (dict_canna_create_priv_dic() < 0) {
+ free(dict->identifier);
+ free(dict->charset);
free(dict);
RkFinalize();
return NULL;
=======================================
--- /trunk/gtk2/dict/word-win-gtk.c Tue May 24 07:45:43 2011
+++ /trunk/gtk2/dict/word-win-gtk.c Sun Sep 18 23:31:57 2011
@@ -495,7 +495,7 @@
g_free(phonetic);
g_free(literal);
g_free(cclass_desc);
- g_free(word);
+ free(word);
#endif
} else {
ret = 0;