[PATCH libXau] Free XauFileName() static buffer at exit

Alan Coopersmith alan.coopersmith at oracle.com
Fri Apr 20 15:06:31 PDT 2012


On 04/20/12 02:56 PM, Chase Douglas wrote:
> On 04/20/2012 02:35 PM, Alan Coopersmith wrote:
>> On 04/20/12 02:18 PM, Chase Douglas wrote:
>>> XauFileName() may allocate and return a static buffer. The only
>>> way to ensure it is freed is to deallocate it when the program exits.
>>
>> ...at which point it's automatically freed.   Is this just trying to
>> silence some sort of memory leak checking?
> 
> Yes. I'm running valgrind and trying to solve leaks. I realize this is
> not a "real" issue, but it's essentially like a compiler warning.
> Reducing warnings and errors helps highlight where there are real problems.

Right, just trying to make sure that I understood what problem you were
trying to solve (quieting false positives so real problems are easier to
find), and the patch seems to be a reasonable way to do that, so:

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list