After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679285 - Plug some refcount leaks
Plug some refcount leaks
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-atk
unspecified
Other All
: Normal normal
: ---
Assigned To: Li Yuan
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-07-02 22:48 UTC by Cosimo Cecchi
Modified: 2012-07-05 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
atk-adaptor: plug a refcount leak (792 bytes, patch)
2012-07-02 22:48 UTC, Cosimo Cecchi
committed Details | Review
atk-adaptor: plug a refcount leak (790 bytes, patch)
2012-07-02 22:48 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2012-07-02 22:48:28 UTC
I am trying to debug some refcounting issues in GTK (now visible since a11y is always on) and I found the following in at-spi2-atk.
Comment 1 Cosimo Cecchi 2012-07-02 22:48:29 UTC
Created attachment 217882 [details] [review]
atk-adaptor: plug a refcount leak
Comment 2 Cosimo Cecchi 2012-07-02 22:48:32 UTC
Created attachment 217883 [details] [review]
atk-adaptor: plug a refcount leak
Comment 3 Mike Gorse 2012-07-04 17:50:27 UTC
Comment on attachment 217882 [details] [review]
atk-adaptor: plug a refcount leak

I would have added a check that the set is not NULL, to avoid possibly
printing a warning, although I don't know how necessary that is; it looks as
though GtkWidgetAccessible always returns an object, for one.

Thanks for the patch.

>From 2eaa8283d48e5c0789a59de2a8b881c5223d6f8f Mon Sep 17 00:00:00 2001
>From: Cosimo Cecchi <cosimoc@gnome.org>
>Date: Mon, 2 Jul 2012 16:14:12 -0400
>Subject: [PATCH] atk-adaptor: plug a refcount leak
>
>https://bugzilla.gnome.org/show_bug.cgi?id=679285
>---
> atk-adaptor/adaptors/accessible-adaptor.c |    1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/atk-adaptor/adaptors/accessible-adaptor.c b/atk-adaptor/adaptors/accessible-adaptor.c
>index 25d7823..15e4a47 100644
>--- a/atk-adaptor/adaptors/accessible-adaptor.c
>+++ b/atk-adaptor/adaptors/accessible-adaptor.c
>@@ -337,6 +337,7 @@ impl_GetRelationSet (DBusConnection * bus,
>     }
>   dbus_message_iter_close_container (&iter, &iter_array);
> oom:
>+  g_object_unref (set);
>   // TODO: handle out of memory */
>   return reply;
> }
>-- 
>1.7.10.4
Comment 4 Mike Gorse 2012-07-04 17:52:15 UTC
Comment on attachment 217883 [details] [review]
atk-adaptor: plug a refcount leak






>From 42ee2a0abb61a377295e836e58b1fe527f276568 Mon Sep 17 00:00:00 2001
>From: Cosimo Cecchi <cosimoc@gnome.org>
>Date: Mon, 2 Jul 2012 16:14:48 -0400
>Subject: [PATCH] atk-adaptor: plug a refcount leak
>
>https://bugzilla.gnome.org/show_bug.cgi?id=679285
>---
> atk-adaptor/event.c |    1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
>index d19f451..1cbda23 100644
>--- a/atk-adaptor/event.c
>+++ b/atk-adaptor/event.c
>@@ -1017,6 +1017,7 @@ children_changed_event_listener (GSignalInvocationHint * signal_hint,
>                                             detail1);
>       emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2,
>                   "(so)", ao, append_object);
>+      g_object_unref (ao);
>     }
>   else
>     {
>-- 
>1.7.10.4
Comment 5 Cosimo Cecchi 2012-07-05 14:20:39 UTC
Attachment 217882 [details] pushed as 246c99e - atk-adaptor: plug a refcount leak
Attachment 217883 [details] pushed as 246c99e - atk-adaptor: plug a refcount leak

Pushed with the suggested changes, thanks for the review.