GNOME Bugzilla – Bug 698951
Memory leaks due to not calling dbus_error_free()
Last modified: 2013-05-02 20:30:30 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.
Should be fixed with commits 551567 and c45b58. Also pushed to gnome-3-8. Thanks for the report.