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
This commit is contained in:
Ray Strode 2020-04-30 10:23:09 -04:00 committed by verdre
parent d823a54b5d
commit b856008914

View File

@ -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)