Fix the bugs about using ecore timer. 70/15170/1
authorsh.pi <sh.pi@samsung.com>
Fri, 7 Jun 2013 09:00:51 +0000 (18:00 +0900)
committerKrzysztof Sasiak <k.sasiak@samsung.com>
Thu, 16 Jan 2014 15:26:26 +0000 (16:26 +0100)
There is the case that ecore timer is double freed. Then the bugs is fixed.
 ecore.c:562 _ecore_magic_fail()   Input handle has already been freed!

Change-Id: I9287292affc66579f2a79800c09692cc0fc12b55
Signed-off-by: Krzysztof Sasiak <k.sasiak@samsung.com>
src/display/battery.c
src/display/core.c

index a9d6eb4..2ae9a75 100644 (file)
@@ -412,7 +412,7 @@ void end_battinfo_gathering(void)
 {
        _I("End battery gathering!");
 
-       if (!timeout_id) {
+       if (timeout_id) {
                ecore_timer_del(timeout_id);
                timeout_id = NULL;
        }
index ff51681..7ca0e2a 100644 (file)
@@ -551,6 +551,7 @@ int delete_condition(enum state_t state)
        while (t != NULL) {
                if (t->timeout_id > 0) {
                        ecore_timer_del(t->timeout_id);
+                       t->timeout_id = NULL;
                }
                tmp = t;
                t = t->next;