Blame SOURCES/0002-barriers-Fix-leak-in-meta_barrier_destroy.patch

79df40
From 574e832f20c8c3f278709531083a03b190f1adfa Mon Sep 17 00:00:00 2001
79df40
From: Ray Strode <rstrode@redhat.com>
79df40
Date: Fri, 25 Sep 2020 14:04:31 -0400
79df40
Subject: [PATCH 2/4] barriers: Fix leak in meta_barrier_destroy
79df40
79df40
meta_barrier_destroy is responsible for removing the extra
79df40
reference added in meta_barrier_constructed.
79df40
79df40
Unfortunately, it fails to do this because of a misplaced early
79df40
return statement.
79df40
79df40
This commit removes the spurious return.
79df40
---
79df40
 src/backends/meta-barrier.c | 2 +-
79df40
 1 file changed, 1 insertion(+), 1 deletion(-)
79df40
79df40
diff --git a/src/backends/meta-barrier.c b/src/backends/meta-barrier.c
79df40
index a1e1180fe..2353ef150 100644
79df40
--- a/src/backends/meta-barrier.c
79df40
+++ b/src/backends/meta-barrier.c
79df40
@@ -264,61 +264,61 @@ meta_barrier_class_init (MetaBarrierClass *klass)
79df40
                   G_TYPE_NONE, 1,
79df40
                   META_TYPE_BARRIER_EVENT);
79df40
 
79df40
   /**
79df40
    * MetaBarrier::left:
79df40
    * @barrier: The #MetaBarrier that was left
79df40
    * @event: A #MetaBarrierEvent that has the details of how
79df40
    * the barrier was left.
79df40
    *
79df40
    * When a pointer barrier hitbox was left, this will trigger.
79df40
    * This requires an XI2-enabled server.
79df40
    */
79df40
   obj_signals[LEFT] =
79df40
     g_signal_new ("left",
79df40
                   G_TYPE_FROM_CLASS (object_class),
79df40
                   G_SIGNAL_RUN_FIRST,
79df40
                   0,
79df40
                   NULL, NULL, NULL,
79df40
                   G_TYPE_NONE, 1,
79df40
                   META_TYPE_BARRIER_EVENT);
79df40
 
79df40
   g_type_class_add_private (object_class, sizeof(MetaBarrierPrivate));
79df40
 }
79df40
 
79df40
 void
79df40
 meta_barrier_destroy (MetaBarrier *barrier)
79df40
 {
79df40
   MetaBarrierImpl *impl = barrier->priv->impl;
79df40
 
79df40
   if (impl)
79df40
-    return META_BARRIER_IMPL_GET_CLASS (impl)->destroy (impl);
79df40
+    META_BARRIER_IMPL_GET_CLASS (impl)->destroy (impl);
79df40
 
79df40
   g_object_unref (barrier);
79df40
 }
79df40
 
79df40
 static void
79df40
 meta_barrier_init (MetaBarrier *barrier)
79df40
 {
79df40
   barrier->priv = G_TYPE_INSTANCE_GET_PRIVATE (barrier, META_TYPE_BARRIER, MetaBarrierPrivate);
79df40
 }
79df40
 
79df40
 void
79df40
 _meta_barrier_emit_hit_signal (MetaBarrier      *barrier,
79df40
                                MetaBarrierEvent *event)
79df40
 {
79df40
   g_signal_emit (barrier, obj_signals[HIT], 0, event);
79df40
 }
79df40
 
79df40
 void
79df40
 _meta_barrier_emit_left_signal (MetaBarrier      *barrier,
79df40
                                 MetaBarrierEvent *event)
79df40
 {
79df40
   g_signal_emit (barrier, obj_signals[LEFT], 0, event);
79df40
 }
79df40
 
79df40
 static void
79df40
 meta_barrier_impl_class_init (MetaBarrierImplClass *klass)
79df40
 {
79df40
   klass->is_active = NULL;
79df40
   klass->release = NULL;
79df40
   klass->destroy = NULL;
79df40
-- 
79df40
2.26.2
79df40