Bug 24612 - Leaks in xtrans 1.2.5
Summary: Leaks in xtrans 1.2.5
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/xtrans (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-19 01:24 UTC by Eric Sesterhenn
Modified: 2009-10-19 09:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix leaks (1.49 KB, patch)
2009-10-19 01:24 UTC, Eric Sesterhenn
no flags Details | Splinter Review

Description Eric Sesterhenn 2009-10-19 01:24:56 UTC
Created attachment 30548 [details] [review]
Fix leaks

Hi,

there are several memory/file handle leaks in xtrans-1.2.5 reported by 
cppcheck:

[xtrans-1.2.5/Xtranslcl.c:355]: (error) Resource leak: server
[xtrans-1.2.5/Xtranslcl.c:1171]: (error) Resource leak: fdr
[xtrans-1.2.5/Xtranslcl.c:1129]: (possible error) Resource leak: fds
[xtrans-1.2.5/Xtranslcl.c:166]: (error) Memory leak: sunaddr
[xtrans-1.2.5/Xtranslcl.c:193]: (error) Memory leak: p_sunaddr


Attached patch fixes those, the last chunk of the patch corrects an invalid check
for the result of an open() operation, which is never true, so this is in fact no memory leak, but results in a coredump if the open fails.

Regards, Eric
Comment 1 Alan Coopersmith 2009-10-19 09:55:14 UTC
Thanks for the patch - pushed to git master - I'm sure if any users of 
the SCO OpenServer & UnixWare platforms upgrade to new X.Org releases,
they will appreciate these fixes.


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.