Bug 16492 - Server leaks minorly in RegisterExtensionNames
Summary: Server leaks minorly in RegisterExtensionNames
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 17:38 UTC by Ben Gamari
Modified: 2008-06-24 19:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch (321 bytes, patch)
2008-06-23 17:51 UTC, Ben Gamari
no flags Details | Splinter Review

Description Ben Gamari 2008-06-23 17:38:41 UTC
I just ran across this leak so I felt I should fix it.
Comment 1 Ben Gamari 2008-06-23 17:51:57 UTC
Created attachment 17338 [details] [review]
Patch
Comment 2 Eamon Walsh 2008-06-24 12:55:06 UTC
Hi, please look at RegisterRequestName, RegisterEventName, and RegisterErrorName in that file.  You will see that they save the result of the strdup in a global array, which is later freed in dixResetRegistry.  So the patch given is not correct.

However, there is a leak in the case where the line is invalid and the loop continues.  I have a patch that I will push up shortly.
Comment 3 Eamon Walsh 2008-06-24 19:17:53 UTC
OK, patch pushed to master and server-1.5-branch.  This was a pretty major leak.  Thanks a lot for reporting it.
Comment 4 Ben Gamari 2008-06-24 19:25:02 UTC
(In reply to comment #3)
> OK, patch pushed to master and server-1.5-branch.  This was a pretty major
> leak.  Thanks a lot for reporting it.
> 

No worries. Sorry about the bad patch earlierThere are plenty more where that came from too. Valgrinding xserver is quite an illuminating experience.


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.