fix a memory leak in the mainloop timers correctly
This commit is contained in:
parent
70a31e8904
commit
861cfbdabe
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue