Bug 16492

Summary: Server leaks minorly in RegisterExtensionNames
Product: xorg Reporter: Ben Gamari <bgamari>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: ewalsh
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch none

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.