[mutter/wip/cally-leak: 25/25] cally: fix state set leak
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/cally-leak: 25/25] cally: fix state set leak
- Date: Fri, 8 May 2020 18:30:34 +0000 (UTC)
commit a4c310754d1d2d15092ff2621f7e84120fbe522f
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 91f68d492..0bc78e8fe 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]