fix a memory leak in the mainloop timers correctly

This commit is contained in:
Dana Jansens 2003-09-14 05:01:54 +00:00
parent 70a31e8904
commit 861cfbdabe

View file

@ -595,7 +595,9 @@ static void timer_dispatch(ObMainLoop *loop, GTimeVal **wait)
g_time_val_add(&curr->timeout, curr->delay); g_time_val_add(&curr->timeout, curr->delay);
insert_timer(loop, curr); insert_timer(loop, curr);
} else { } else {
curr->del_me = TRUE; if (curr->destroy)
curr->destroy(curr->data);
g_free(curr);
} }
/* if at least one timer fires, then don't wait on X events, as there /* if at least one timer fires, then don't wait on X events, as there