edje_util: fix memory leak
authorAndrii Kroitor <an.kroitor@samsung.com>
Fri, 24 Apr 2015 07:03:16 +0000 (16:03 +0900)
committerChunEon Park <chuneon.park@samsung.com>
Fri, 24 Apr 2015 07:03:16 +0000 (16:03 +0900)
Summary:
list returned by evas_object_box_children_get should be freed

@fix

Reviewers: cedric, seoz, raster, reutskiy.v.v, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2413

src/lib/edje/edje_util.c

index 3cea40e4e4b6e8f5ce2e1ff16d29883784b0ea32..cec0ffb86b38b2824b045eb76edfa55bcd89530c 100644 (file)
@@ -4266,7 +4266,10 @@ _edje_real_part_box_remove_all(Edje *ed, Edje_Real_Part *rp, Eina_Bool clear)
              _edje_box_layout_remove_child(rp, child_obj);
              _edje_child_remove(ed, rp, child_obj);
              if (!evas_object_box_remove_at(rp->object, i))
-               return EINA_FALSE;
+               {
+                  eina_list_free(children);
+                  return EINA_FALSE;
+               }
              if (clear)
                evas_object_del(child_obj);
           }