According to the man page about XKeysymToString "The returned string is in a static area and must not be modified." But:
<kuzak> it uses malloc() and it's leaked
<kuzak> so is it a bug in xlib?
<daniels> if the lookup succeeds, then you're safe because it returns a pointer into the xrm area
<daniels> if the lookup fails and it just returns a unicode code, then it mallocs
*** This bug has been marked as a duplicate of bug 7100 ***