Memory leak in XkbGetMap and a portability question

Shachar Shemesh shachar at shemesh.biz
Sun Mar 25 00:25:13 PDT 2007


Shachar Shemesh wrote:
> The 40 bytes, however, are a more serious problem. For every call to
> XkbGetMap I perform in my program I lose 40 bytes. If I use a less empty
> mask for the information to retrieve I lose more bytes per call. It
> seems to me that either XkbFreeClientMap is not doing its job properly
> or the docs failed to mention another freeing function that needs to be
> called.
>   
Just thought I'll focus the problem a little more. Here is the valgrind
report:
> ==16589== 40 bytes in 1 blocks are definitely lost in loss record 2 of 2
> ==16589==    at 0x401C6CA: calloc (vg_replace_malloc.c:279)
> ==16589==    by 0x40EF261: XkbGetMap (XKBGetMap.c:557)
> ==16589==    by 0x80489E5: test (xkb.c:69)
> ==16589==    by 0x8048CEE: main (xkb.c:144)

Shachar



More information about the xorg mailing list