summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-08-25 09:35:05 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-08-25 20:25:34 +0530
commit40e0ea58e1d268383b47459cdd3279203f0b60f0 (patch)
treed01b3348008f4e2911571231a6fb14af16fffb88
parent92e654b75ae9fa034fa79e3c549b93afbd2268f5 (diff)
scroller: fix memory leak on keys traversal
@fix
-rw-r--r--src/lib/elm_scroller.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c
index 4d45fd450..e041a4431 100644
--- a/src/lib/elm_scroller.c
+++ b/src/lib/elm_scroller.c
@@ -144,6 +144,7 @@ _key_action_move(Evas_Object *obj, const char *params)
144 if (cur_weight == 0.0) 144 if (cur_weight == 0.0)
145 { 145 {
146 elm_widget_focus_steal(cur); 146 elm_widget_focus_steal(cur);
147 eina_list_free(can_focus_list);
147 return EINA_TRUE; 148 return EINA_TRUE;
148 } 149 }
149 cur_weight = 1.0 / cur_weight; 150 cur_weight = 1.0 / cur_weight;
@@ -157,6 +158,7 @@ _key_action_move(Evas_Object *obj, const char *params)
157 if (new_focus) 158 if (new_focus)
158 { 159 {
159 elm_widget_focus_steal(new_focus); 160 elm_widget_focus_steal(new_focus);
161 eina_list_free(can_focus_list);
160 return EINA_TRUE; 162 return EINA_TRUE;
161 } 163 }
162 } 164 }
@@ -189,10 +191,14 @@ _key_action_move(Evas_Object *obj, const char *params)
189 if (ELM_RECTS_INTERSECT(x, y, v_w, v_h, l_x, l_y, l_w, l_h)) 191 if (ELM_RECTS_INTERSECT(x, y, v_w, v_h, l_x, l_y, l_w, l_h))
190 { 192 {
191 elm_widget_focus_steal(new_focus); 193 elm_widget_focus_steal(new_focus);
194 eina_list_free(can_focus_list);
192 return EINA_TRUE; 195 return EINA_TRUE;
193 } 196 }
194 } 197 }
195 } 198 }
199
200 eina_list_free(can_focus_list);
201
196 if (!strcmp(dir, "left")) 202 if (!strcmp(dir, "left"))
197 { 203 {
198 if ((x <= 0) && (!sd->loop_h)) return EINA_FALSE; 204 if ((x <= 0) && (!sd->loop_h)) return EINA_FALSE;