summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-09-14 05:01:54 +0000
committerDana Jansens <danakj@orodu.net>2003-09-14 05:01:54 +0000
commit861cfbdabee7b97e4eb87f117e5683394d550260 (patch)
treef8b23f0a614451b37337e016ff430007be416a62 /openbox
parent70a31e890435d57f02d5e95a4a09216e23eabd1b (diff)
fix a memory leak in the mainloop timers correctly
Diffstat (limited to 'openbox')
-rw-r--r--openbox/mainloop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbox/mainloop.c b/openbox/mainloop.c
index 6061a460..4dce047e 100644
--- a/openbox/mainloop.c
+++ b/openbox/mainloop.c
@@ -595,7 +595,9 @@ static void timer_dispatch(ObMainLoop *loop, GTimeVal **wait)
g_time_val_add(&curr->timeout, curr->delay);
insert_timer(loop, curr);
} 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