[uim-commit] r121 - trunk/helper

tkng@freedesktop.org tkng@freedesktop.org
Tue Jan 4 23:42:54 PST 2005


Author: tkng
Date: 2005-01-04 23:42:50 -0800 (Tue, 04 Jan 2005)
New Revision: 121

Modified:
   trunk/helper/pref-gtk.c
Log:
* helper/pref-gtk.c:
 -(create_group_widget): Fixed a memory leak.


Modified: trunk/helper/pref-gtk.c
===================================================================
--- trunk/helper/pref-gtk.c	2005-01-04 23:07:24 UTC (rev 120)
+++ trunk/helper/pref-gtk.c	2005-01-05 07:42:50 UTC (rev 121)
@@ -359,15 +359,11 @@
   group_label = gtk_label_new("");
   label_text  = g_markup_printf_escaped("<span size=\"xx-large\">%s</span>",
 					group->label);
-					
   gtk_label_set_markup(GTK_LABEL(group_label), label_text);
   g_free(label_text);
+
   gtk_box_pack_start (GTK_BOX(vbox), group_label, FALSE, TRUE, 8);
 
-  group = uim_custom_group_get(group_name);
-  if (!group)
-    return NULL;
-
   custom_syms = uim_custom_collect_by_group(group_name);
   if (custom_syms) {
     for (custom_sym = custom_syms; *custom_sym; custom_sym++) {
@@ -376,6 +372,8 @@
     uim_custom_symbol_list_free(custom_syms);
   }
   
+  uim_custom_group_free(group);
+
   setting_button_box = create_setting_button_box(group_name);
   gtk_box_pack_end(GTK_BOX(vbox), setting_button_box, FALSE, FALSE, 8);
 
@@ -453,7 +451,6 @@
 
   gtk_main();
 
-  uim_custom_quit();
   uim_quit();
 
   return 0;



More information about the Uim-commit mailing list