[PATCH 2/4] glx: Fix memory leak in context garbage collection (v2)

Daniel Stone daniel at fooishbar.org
Tue Oct 8 14:09:33 PDT 2013


Hi,

On 8 October 2013 19:22, Mouse <mouse at rodents-montreal.org> wrote:
>> Good catch.  It's just luck that False is #defined as 0. :)  It
>> should, of course, be NULL.
>
> Well, I'd actually disagree; I think NULL should never be used - see my
> blah post of 2009-10-09
> (http://ftp.rodents-montreal.org/mouse/blah/2009-10-09-1.html) for why.

Given the choice between inventing our own 'nil pointer' type and thus
deviating from the entire body of C code written ever, and working
correctly on systems which define NULL as a pointer-cast zero value
(and thus getting appropriate integer/pointer mismatch warnings on
relevant compilers), we're taking the latter.

Cheers,
Daniel


More information about the xorg-devel mailing list