[mutter/wip/cally-leak: 598/598] cally: fix state set leak




commit 874027810d35b3f8bdf77e4349b2dfb53b191c13
Author: Ray Strode <rstrode redhat com>
Date:   Thu Apr 30 10:23:09 2020 -0400

    cally: fix state set leak
    
    cally_actor_action_do_action leaks a state set object in the
    case where the actor is defunct, insensitive, or hidden.
    
    This commit plugs the leak.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1225

 clutter/clutter/cally/cally-actor.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/clutter/clutter/cally/cally-actor.c b/clutter/clutter/cally/cally-actor.c
index fa02575485..adf440c0e7 100644
--- a/clutter/clutter/cally/cally-actor.c
+++ b/clutter/clutter/cally/cally-actor.c
@@ -767,10 +767,10 @@ static gboolean
 cally_actor_action_do_action (AtkAction *action,
                              gint       index)
 {
-  CallyActor           *cally_actor = NULL;
-  AtkStateSet          *set         = NULL;
-  CallyActorPrivate    *priv        = NULL;
-  CallyActorActionInfo *info        = NULL;
+  CallyActor              *cally_actor = NULL;
+  g_autoptr (AtkStateSet)  set         = NULL;
+  CallyActorPrivate       *priv        = NULL;
+  CallyActorActionInfo    *info        = NULL;
 
   cally_actor = CALLY_ACTOR (action);
   priv = cally_actor->priv;
@@ -784,8 +784,6 @@ cally_actor_action_do_action (AtkAction *action,
       !atk_state_set_contains_state (set, ATK_STATE_SHOWING))
     return FALSE;
 
-  g_object_unref (set);
-
   info = _cally_actor_get_action_info (cally_actor, index);
 
   if (info == NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]