Edje entry: Fix memory leak.
authorSubodhKumar <s7158.kumar@samsung.com>
Fri, 4 Nov 2016 10:26:02 +0000 (15:56 +0530)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 17 Nov 2016 07:54:17 +0000 (16:54 +0900)
Summary:
Fix memory leak

If user or extra cursor is used, these should be free on
shutdown.

@fix

Test Plan: NA

Reviewers: tasn, herdsman

Subscribers: shilpasingh, cedric, jpeg

Projects: efl

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

Change-Id: I6e47fec4d6ad53bc3943c90dfe1805a75cceb2fa
Signed-off-by: SubodhKumar <s7158.kumar@samsung.com>
src/lib/edje/edje_entry.c

index 41ba192..0895e6f 100644 (file)
@@ -2981,6 +2981,12 @@ _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp, Eina_Bool reuse_ic)
    evas_object_del(en->cursor_fg);
    evas_object_del(en->cursor_fg2);
 
+   if (en->cursor_user)
+     evas_textblock_cursor_free(en->cursor_user);
+
+   if (en->cursor_user_extra)
+     evas_textblock_cursor_free(en->cursor_user_extra);
+
    if (en->pw_timer)
      {
         ecore_timer_del(en->pw_timer);