GNOME Bugzilla – Bug 737338
gmain: Unref child sources when finalising a GSource
Last modified: 2014-09-25 13:00:17 UTC
Patches attached.
Created attachment 287049 [details] [review] gmain: Fix some signed/unsigned integer comparisons Just to shut gcc up.
Created attachment 287050 [details] [review] gmain: Unref child sources when finalising a GSource If a GSource is created, *not* attached to a GMainContext, and then has child sources added, dropping the last reference to the parent GSource will leak its references to its child sources. Currently, child sources are only unreffed when g_source_destroy() is called on the parent.
Comment on attachment 287050 [details] [review] gmain: Unref child sources when finalising a GSource ok, but: >+ while (source->priv->child_sources) { >+ GSource *child_source = source->priv->child_sources->data; fix the indent style. ("{" should go on the next line)
Pushed with the style fix (whoops, sorry). Attachment 287049 [details] pushed as eaca868 - gmain: Fix some signed/unsigned integer comparisons Attachment 287050 [details] pushed as 1c6df7a - gmain: Unref child sources when finalising a GSource