eom: free allocated external output list when eom deinit 89/128689/4 accepted/tizen/unified/20170517.125608 submit/tizen/20170517.050332 tizen_4.0.m1_release
authorJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 11 May 2017 05:28:42 +0000 (14:28 +0900)
committerBoram Park <boram1288.park@samsung.com>
Fri, 12 May 2017 08:10:43 +0000 (08:10 +0000)
Change-Id: If8f6aa09628ab42cc65a1e4b591d0993c45a0f62
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/e_devicemgr_eom.c

index ec503cb47b7705ce1b08d562b4539d0efcfded07..0652e95b7af0c672993fb03dda4225ae83661c71 100644 (file)
@@ -1573,6 +1573,8 @@ err:
           free(output);
 
         eina_list_free(g_eom->outputs);
+
+        g_eom->outputs = NULL;
      }
 
    return EINA_FALSE;
@@ -1617,6 +1619,21 @@ _e_eom_deinit()
      {
         EINA_LIST_FREE(g_eom->handlers, h)
           ecore_event_handler_del(h);
+
+        g_eom->handlers = NULL;
+     }
+
+   if (g_eom->outputs)
+     {
+        Eina_List *l;
+        E_EomOutputPtr output;
+
+        EINA_LIST_FOREACH(g_eom->outputs, l, output)
+          free(output);
+
+        eina_list_free(g_eom->outputs);
+
+        g_eom->outputs = NULL;
      }
 
    if (g_eom->dpy)