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 684033 - Fix leaks
Fix leaks
Status: RESOLVED OBSOLETE
Product: at-spi
Classification: Platform
Component: at-spi2-core
unspecified
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-09-14 16:18 UTC by William Jon McCann
Modified: 2021-07-05 10:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't leak errors (23.51 KB, patch)
2012-09-14 16:18 UTC, William Jon McCann
committed Details | Review
Make build silent (764 bytes, patch)
2012-09-14 16:18 UTC, William Jon McCann
committed Details | Review
Don't leak the display string (2.91 KB, patch)
2012-09-14 18:14 UTC, William Jon McCann
committed Details | Review
Don't leak dbus connections (1.49 KB, patch)
2012-09-14 18:14 UTC, William Jon McCann
none Details | Review
Don't leak dbus connections (2.58 KB, patch)
2012-09-15 10:54 UTC, William Jon McCann
committed Details | Review
Don't leak bus name (2.59 KB, patch)
2012-09-15 10:55 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2012-09-14 16:18:14 UTC
Here's a patch to fix a lot of error leaks.
Comment 1 William Jon McCann 2012-09-14 16:18:53 UTC
Created attachment 224344 [details] [review]
Don't leak errors
Comment 2 William Jon McCann 2012-09-14 16:18:55 UTC
Created attachment 224345 [details] [review]
Make build silent

So we can see warnings better.
Comment 3 William Jon McCann 2012-09-14 18:14:24 UTC
Created attachment 224355 [details] [review]
Don't leak the display string
Comment 4 William Jon McCann 2012-09-14 18:14:26 UTC
Created attachment 224356 [details] [review]
Don't leak dbus connections
Comment 5 Mike Gorse 2012-09-14 20:17:13 UTC
Comment on attachment 224344 [details] [review]
Don't leak errors

That's fine. Thanks for the patch.
Comment 6 William Jon McCann 2012-09-15 10:54:58 UTC
Created attachment 224392 [details] [review]
Don't leak dbus connections

By using a private connection and closing it.
Comment 7 William Jon McCann 2012-09-15 10:55:02 UTC
Created attachment 224393 [details] [review]
Don't leak bus name
Comment 8 Mike Gorse 2012-09-17 16:30:07 UTC
(In reply to comment #6)
> Created an attachment (id=224392) [details] [review]
> Don't leak dbus connections
> 
> By using a private connection and closing it.

_atspi_process_deferred_messages shouldn't have the side-effect of closing the D-Bus connection. I think that the patch is okay aside from that.
Comment 9 Mike Gorse 2012-09-17 16:32:59 UTC
(In reply to comment #7)
> Created an attachment (id=224393) [details] [review]
> Don't leak bus name

That looks like it would free the bus name that was just added to the hash, when the pointer is now owned by the hash and should be freed when the hash is destroyed. Theoretically, the bus name could leak if _atspi_application_new failed, but the NULL check of the return value isn't really necessary since g_object_new will error rather than fail, so I've removed it.

Or am I misunderstanding something?
Comment 10 Mike Gorse 2012-09-17 19:12:21 UTC
(In reply to comment #6)
> Created an attachment (id=224392) [details] [review]
> Don't leak dbus connections
> 
> By using a private connection and closing it.

Actually, this seems to badly break Orca (though it looked as though it should work). It ends up hanging in dbus_connection_send_and_reply_and_block. I'm trying to investigate.
Comment 11 Mike Gorse 2012-09-17 21:08:03 UTC
(In reply to comment #10)
> (In reply to comment #6)
> > Created an attachment (id=224392) [details] [review] [details] [review]
> > Don't leak dbus connections
> > 
> > By using a private connection and closing it.
> 
> Actually, this seems to badly break Orca (though it looked as though it should
> work). It ends up hanging in dbus_connection_send_and_reply_and_block. I'm

I was misremembering the way atspi_get_a11y_bus() works to some extent; now it winds up allocating separate bus connections for atk-brdige vs. libatspi, and currently libatspi doesn't, say, start a main loop to poll all of the relevant connections. I'm trying to fix to have the connection shared between libatspi and atk-bridge, without creating an extra ref.
Comment 12 Mike Gorse 2012-09-18 01:25:27 UTC
Comment on attachment 224392 [details] [review]
Don't leak dbus connections

Attachment 224392 [details] committed with some modifications as 836829.
Comment 13 André Klapper 2013-08-14 10:03:05 UTC
[Mass-resetting default assignee, see bug 705890. Please reclaim this bug report by setting the assignee to yourself if you still plan to work on this. Thanks!]
Comment 14 GNOME Infrastructure Team 2021-07-05 10:44:46 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/at-spi2-core/-/issues/

Thank you for your understanding and your help.