GNOME Bugzilla – Bug 684033
Fix leaks
Last modified: 2021-07-05 10:44:46 UTC
Here's a patch to fix a lot of error leaks.
Created attachment 224344 [details] [review] Don't leak errors
Created attachment 224345 [details] [review] Make build silent So we can see warnings better.
Created attachment 224355 [details] [review] Don't leak the display string
Created attachment 224356 [details] [review] Don't leak dbus connections
Comment on attachment 224344 [details] [review] Don't leak errors That's fine. Thanks for the patch.
Created attachment 224392 [details] [review] Don't leak dbus connections By using a private connection and closing it.
Created attachment 224393 [details] [review] Don't leak bus name
(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.
(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?
(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.
(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 on attachment 224392 [details] [review] Don't leak dbus connections Attachment 224392 [details] committed with some modifications as 836829.
[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!]
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.