summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-06 11:06:56 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-06 11:06:56 +0900
commita13570c17c97bb9407c24bcf78ab28eaa4541ad9 (patch)
tree65242b743358356e8c04376e8f158b21066865e8
parent43a4411f43e16bfbf9a178f9ad3f093f7896d093 (diff)
ecore timer - fuix up segv storm that has crept in with frees
freeing already freed data, not clearing up pointers to freed data once freed etc. etc. etc. - segv land. fix that up so we can use efl again. :(
-rw-r--r--src/lib/ecore/ecore_timer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 54cf773149..1b69676e54 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -157,8 +157,14 @@ _ecore_timer_legacy_tick(void *data, const Eo_Event *event)
157 157
158 if (!_ecore_call_task_cb(legacy->func, (void*)legacy->data)) 158 if (!_ecore_call_task_cb(legacy->func, (void*)legacy->data))
159 { 159 {
160 eo_del(event->obj); 160 if (eo_key_data_get(event->obj, "_legacy"))
161 free(legacy); 161 {
162 eo_key_del(event->obj, "_legacy");
163 eo_event_callback_del(event->obj, EFL_TIMER_EVENT_TICK,
164 _ecore_timer_legacy_tick, legacy),
165 free(legacy);
166 eo_del(event->obj);
167 }
162 } 168 }
163 169
164 return EO_CALLBACK_CONTINUE; 170 return EO_CALLBACK_CONTINUE;
@@ -219,8 +225,10 @@ ecore_timer_del(Ecore_Timer *timer)
219 legacy = eo_key_data_get(timer, "_legacy"); 225 legacy = eo_key_data_get(timer, "_legacy");
220 data = (void*) legacy->data; 226 data = (void*) legacy->data;
221 227
222 free(legacy);
223 eo_key_del(timer, "_legacy"); 228 eo_key_del(timer, "_legacy");
229 eo_event_callback_del(timer, EFL_TIMER_EVENT_TICK,
230 _ecore_timer_legacy_tick, legacy),
231 free(legacy);
224 eo_del(timer); 232 eo_del(timer);
225 233
226 return data; 234 return data;