X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fmainloop.c;h=4dce047ee9dd79cc48aa9f56e687067988591ffb;hb=b317f0140398308fce5fbd262ad99a290b54a449;hp=397f8ae21a4aced2ad6b1949abb9b9bcc59f08fa;hpb=1df4e327607f7dcf56826928efdddb809d8f1fc3;p=chaz%2Fopenbox diff --git a/openbox/mainloop.c b/openbox/mainloop.c index 397f8ae2..4dce047e 100644 --- a/openbox/mainloop.c +++ b/openbox/mainloop.c @@ -594,8 +594,10 @@ static void timer_dispatch(ObMainLoop *loop, GTimeVal **wait) if (curr->func(curr->data)) { g_time_val_add(&curr->timeout, curr->delay); insert_timer(loop, curr); - } else if (curr->destroy) { - curr->destroy(curr->data); + } else { + 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