summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2020-10-13 15:09:43 +0200
committerBenjamin Berg <bberg@redhat.com>2020-10-13 15:12:37 +0200
commitbf814a9aa3b8b47f06a8e2dfa54597769a76c69c (patch)
tree3f2d57a0f2a4c2181fbf44b785cd05a97c1e3bc7
parent2954754cb3a5c7615aad3b477aeb9a172a8a776f (diff)
downloadglib-bf814a9aa3b8b47f06a8e2dfa54597769a76c69c.tar.gz
gmain: Fix possible locking issue in source unref
When unref'ing child sources, the lock is already held. But instead of passing TRUE to g_source_unref_internal it currently passes whether the lock was already held outside of the current invocation. Just pass TRUE to fix this possible issue.
-rw-r--r--glib/gmain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glib/gmain.c b/glib/gmain.c
index 675ff3886..acbd0d4f0 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2293,7 +2293,7 @@ g_source_unref_internal (GSource *source,
g_slist_remove (source->priv->child_sources, child_source);
child_source->priv->parent_source = NULL;
- g_source_unref_internal (child_source, context, have_lock);
+ g_source_unref_internal (child_source, context, TRUE);
}
g_slice_free (GSourcePrivate, source->priv);