GNOME Bugzilla – Bug 679285
Plug some refcount leaks
Last modified: 2012-07-05 14:20:44 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.
Created attachment 217882 [details] [review] atk-adaptor: plug a refcount leak
Created attachment 217883 [details] [review] atk-adaptor: plug a refcount leak
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 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
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.