[gnome-flashback/wip/segeiger/gnome-3-18-inputmethods] Free lists



commit a300e28c5d770a8ed8f10573e654244676a27581
Author: Sebastian Geiger <sbastig gmx net>
Date:   Wed Jan 13 15:28:39 2016 +0100

    Free lists

 .../libinput-sources/gf-candidate-popup.c          |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-candidate-popup.c 
b/gnome-flashback/libinput-sources/gf-candidate-popup.c
index 7673990..a7efe1a 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-popup.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-popup.c
@@ -240,18 +240,19 @@ update_lookup_table_cb (IBusPanelService *service,
   for (i = start_index; i < end_index; i++)
     {
       IBusText *ibus_text;
-      gchar* text;
+      const gchar* text;
 
       ibus_text = ibus_lookup_table_get_candidate(lookup_table, i);
-      text = g_strdup (ibus_text_get_text(ibus_text));
-      candidates = g_list_append (candidates, text);
+      text = ibus_text_get_text(ibus_text);
+      candidates = g_list_append (candidates, (gpointer) text);
     }
 
   gf_candidate_area_set_candidates (GF_CANDIDATE_AREA (popup->candidate_area),
                                     indexes, candidates, cursor_position,
                                     visible);
 
-  //TODO: free the stuff
+  g_list_free (indexes);
+  g_list_free (candidates);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]