From 1e78d90a37903d1eaef8f503bf7711a6829df82e Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 25 Sep 2020 14:04:31 -0400 Subject: [PATCH] barriers: Free backend implementation at dispose time When a MetaBarrier is first created it allocates a backend impl object which does the actual heavy lifting. Unfortunately, that backend object is never freed. This commit ensures the implementation gets freed when the barrier object is freed. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1451 --- src/backends/meta-barrier.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/meta-barrier.c b/src/backends/meta-barrier.c index ad6c8d583..71536c3d7 100644 --- a/src/backends/meta-barrier.c +++ b/src/backends/meta-barrier.c @@ -128,6 +128,7 @@ static void meta_barrier_dispose (GObject *object) { MetaBarrier *barrier = META_BARRIER (object); + MetaBarrierPrivate *priv = barrier->priv; if (meta_barrier_is_active (barrier)) { @@ -135,6 +136,8 @@ meta_barrier_dispose (GObject *object) barrier); } + g_clear_object (&priv->impl); + G_OBJECT_CLASS (meta_barrier_parent_class)->dispose (object); }