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 698951 - Memory leaks due to not calling dbus_error_free()
Memory leaks due to not calling dbus_error_free()
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-atk
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Li Yuan
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-04-26 13:46 UTC by Eduardo Lima Mitev
Modified: 2013-05-02 20:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eduardo Lima Mitev 2013-04-26 13:46:33 UTC
In atk-adaptor/bridge.c there are at least 5 calls to dbus_error_init() without the corresponding dbus_error_free(), causing memory leaks. Example valgrind stack trace:

==7379== 727 (184 direct, 543 indirect) bytes in 1 blocks are definitely lost in loss record 8,112 of 8,354
==7379==    at 0x4C272B8: calloc (vg_replace_malloc.c:566)
==7379==    by 0xB7893A5: ??? (in /lib/x86_64-linux-gnu/libdbus-1.so.3.7.2)
==7379==    by 0xB78CE0B: dbus_message_new_error (in /lib/x86_64-linux-gnu/libdbus-1.so.3.7.2)
==7379==    by 0xB78F8C5: ??? (in /lib/x86_64-linux-gnu/libdbus-1.so.3.7.2)
==7379==    by 0xB780DF1: dbus_connection_send_with_reply (in /lib/x86_64-linux-gnu/libdbus-1.so.3.7.2)
==7379==    by 0xB781090: dbus_connection_send_with_reply_and_block (in /lib/x86_64-linux-gnu/libdbus-1.so.3.7.2)
==7379==    by 0xB77C78B: dbus_bus_register (in /lib/x86_64-linux-gnu/libdbus-1.so.3.7.2)
==7379==    by 0x15012DE6: atspi_get_a11y_bus (atspi-misc.c:1567)
==7379==    by 0x116B5A8E: atk_bridge_adaptor_init (bridge.c:863)
==7379==    by 0x7FF6929: _gtk_accessibility_init (gtkaccessibility.c:1015)
==7379==    by 0x7E53E45: post_parse_hook (gtkmain.c:729)
==7379==    by 0x9D0DD76: g_option_context_parse (goption.c:2025)
==7379==    by 0x7E5430D: gtk_parse_args (gtkmain.c:948)
==7379==    by 0x7E54368: gtk_init_check (gtkmain.c:987)
==7379==    by 0x7E54398: gtk_init (gtkmain.c:1042)
==7379==    by 0x4074E5: main (in /opt/jhbuild/gnome3/checkout/WebKit/WebKitBuild/Release/Programs/MiniBrowser)

There might be similar leaks in other parts of the module, so it might be useful to check other files that use the DBus API.
Comment 1 Mike Gorse 2013-05-02 20:30:30 UTC
Should be fixed with commits 551567 and c45b58.
Also pushed to gnome-3-8.
Thanks for the report.