ecore_idle_exiter: unlock when Ecore_Task_Cb is NULL
authorSung-Taek Hong <sth253.hong@samsung.com>
Thu, 10 Dec 2015 08:01:25 +0000 (17:01 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Thu, 10 Dec 2015 08:01:25 +0000 (17:01 +0900)
Summary:
- When Ecore_Task_Cb is not set, _ecore_idle_exiter_constructor
  returns without _ecore_unlock(), and remains to be locked.

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

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

src/lib/ecore/ecore_idle_exiter.c

index f8aed55..3160f23 100644 (file)
@@ -57,13 +57,15 @@ _ecore_idle_exiter_constructor(Eo *obj, Ecore_Idle_Exiter_Data *ie, Ecore_Task_C
    if (!func)
      {
         ERR("callback function must be set up for an object of class: '%s'", MY_CLASS_NAME);
-        return;
+        goto unlock;
      }
 
    ie->func = func;
    ie->data = (void *)data;
 
    idle_exiters = (Ecore_Idle_Exiter_Data *)eina_inlist_append(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(ie));
+
+unlock:
    _ecore_unlock();
 }