If a context was freed with sources still attached, those sources
correctly got destroyed, but the corresponding GSourceList structs
were being leaked.
https://bugzilla.gnome.org/show_bug.cgi?id=682560
{
GSourceIter iter;
GSource *source;
+ GList *sl_iter;
+ GSourceList *list;
g_return_if_fail (context != NULL);
g_return_if_fail (g_atomic_int_get (&context->ref_count) > 0);
source->context = NULL;
g_source_destroy_internal (source, context, FALSE);
}
+ for (sl_iter = context->source_lists; sl_iter; sl_iter = sl_iter->next)
+ {
+ list = sl_iter->data;
+ g_slice_free (GSourceList, list);
+ }
+ g_list_free (context->source_lists);
g_mutex_clear (&context->mutex);