GNOME Bugzilla – Bug 635099
Memory leak in gdbus introspection when parsing xml
Last modified: 2011-02-15 08:16:34 UTC
Memory leaks of 608 bytes occurs in every call to 'g_dbus_node_info_new_for_xml'. The problem is the parser not completely freeing some ptr arrays after parsing is done. Attached is an example program showing the leak. Compile it with 'gcc -o leak `pkg-config --libs --cflags glib-2.0 gio-2.0 gio-unix-2.0` leak.c'. Change the RUNS macro to see how leak increases with number of calls to 'g_dbus_node_info_new_for_xml'.
Created attachment 174708 [details] program to reproduce the leak
Created attachment 174709 [details] valgrind output Obtained with: G_SLICE=always-malloc G_DEBUG=gc-friendly,resident-modules valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --log-file=vgdump ./leak
Ok, this is not getting any attention. Has somebody confirmed it? I'll try to provide a patch.
Verified, memory leak is gone. Thank you Matthias.