diff options
Diffstat (limited to 'common/glib-ectomy.c')
-rw-r--r-- | common/glib-ectomy.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/glib-ectomy.c b/common/glib-ectomy.c index f1d79e7f..7644fd18 100644 --- a/common/glib-ectomy.c +++ b/common/glib-ectomy.c @@ -133,6 +133,14 @@ guint g_io_add_watch(GIOChannel *channel, GIOCondition condition, func, user_data, NULL); } +static void timeout_free(void *data, void *user_data) +{ + struct timeout *t = data; + + if (t) + free (t); +} + static GMainContext *g_main_context_default() { @@ -310,6 +318,7 @@ void g_main_loop_unref(GMainLoop *loop) if (!loop->context) return; + slist_foreach(loop->context->ltimeout, timeout_free, NULL); slist_free(loop->context->ltimeout); free(loop->context); } |