Bug 20063 - XKeysymToString can leak memory
Summary: XKeysymToString can leak memory
Status: RESOLVED DUPLICATE of bug 7100
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: git
Hardware: ARM Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Depends on:
Reported: 2009-02-11 06:57 UTC by Kimmo Hämäläinen
Modified: 2009-02-17 06:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Kimmo Hämäläinen 2009-02-11 06:57:20 UTC
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> yeah
<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
Comment 1 Julien Cristau 2009-02-17 06:33:22 UTC

*** This bug has been marked as a duplicate of bug 7100 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.