Memory leak in XrmGetStringDatabase
Submitted by Ingo Bürk
Assigned to Xorg Project Team
Description
Using XrmGetStringDatabase results in memory leaks, despite calling XrmDestroyDatabase. The following is an excerpt from running valgrind:
==21703== 192 (16 direct, 176 indirect) bytes in 1 blocks are definitely lost in loss record 1,051 of 1,063
==21703== at 0x4C2CB1D: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21703== by 0x508CE40: ??? (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x508D3B3: ??? (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x508EC9E: ??? (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x508F4AB: _XlcCreateLC (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x50AC8AF: _XlcDefaultLoader (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x5096D3D: _XOpenLC (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x5096F4A: _XrmInitParseInfo (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x507E96F: ??? (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x5081F4D: XrmGetStringDatabase (in /usr/lib/libX11.so.6.3.0)
==21703== by 0x4020A2: check_get_resource_xlib (test.c:413)
==21703== by 0x402222: check_get_resource (test.c:457)
==21703== by 0x401AF2: test_get_resource (test.c:267)
==21703== by 0x401AF2: main (test.c:77)
Please let me know about further information you need.