summaryrefslogtreecommitdiff
path: root/src/lib/elm_toolbar.c
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2014-12-26 11:26:42 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-12-26 11:27:07 +0900
commitd9c9aae1123304b0a6069e17a30f56572ba42b5f (patch)
tree8c07ce158cd1cc736791345fbdf0d1147314a523 /src/lib/elm_toolbar.c
parent216f76c5205aae9c1d32f989634f5bd9c87d112a (diff)
elm_toolbar: fix memory leak in _elm_toolbar_nearest_visible_item_get
@fix Reviewers: cedric, seoz, Hermet, raster Subscribers: reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D1822
Diffstat (limited to 'src/lib/elm_toolbar.c')
-rw-r--r--src/lib/elm_toolbar.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 8ba4e3ca3..cff0cf02a 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -690,7 +690,10 @@ _elm_toolbar_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it)
690 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, ix, iy, iw, ih)) 690 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, ix, iy, iw, ih))
691 { 691 {
692 if (!elm_object_item_disabled_get(eo_it)) 692 if (!elm_object_item_disabled_get(eo_it))
693 return eo_it; 693 {
694 eina_list_free(item_list);
695 return eo_it;
696 }
694 else 697 else
695 search_next = EINA_TRUE; 698 search_next = EINA_TRUE;
696 } 699 }
@@ -709,7 +712,10 @@ _elm_toolbar_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it)
709 evas_object_geometry_get(VIEW(item), &cx, &cy, &cw, &ch); 712 evas_object_geometry_get(VIEW(item), &cx, &cy, &cw, &ch);
710 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && 713 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) &&
711 !elm_object_item_disabled_get(EO_OBJ(item))) 714 !elm_object_item_disabled_get(EO_OBJ(item)))
712 return EO_OBJ(item); 715 {
716 eina_list_free(item_list);
717 return EO_OBJ(item);
718 }
713 } 719 }
714 } 720 }
715 else 721 else
@@ -724,9 +730,13 @@ _elm_toolbar_nearest_visible_item_get(Evas_Object *obj, Elm_Object_Item *eo_it)
724 evas_object_geometry_get(VIEW(item), &cx, &cy, &cw, &ch); 730 evas_object_geometry_get(VIEW(item), &cx, &cy, &cw, &ch);
725 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) && 731 if (ELM_RECTS_INCLUDE(vx, vy, vw, vh, cx, cy, cw, ch) &&
726 !elm_object_item_disabled_get(EO_OBJ(item))) 732 !elm_object_item_disabled_get(EO_OBJ(item)))
727 return EO_OBJ(item); 733 {
734 eina_list_free(item_list);
735 return EO_OBJ(item);
736 }
728 } 737 }
729 } 738 }
739 eina_list_free(item_list);
730 return eo_it; 740 return eo_it;
731} 741}
732 742