[PATCH 2/6] xserver: Possible memory leaks, stricter option checks, UnInit (NewInputDeviceRequest)

Magnus Vigerlöf Magnus.Vigerlof at home.se
Thu Mar 29 17:10:24 PDT 2007


On Thursday 29 March 2007 04:40, Eric Anholt wrote:
[...]
> > I guess xfree can't handle freeing already NULL pointers?  If so it
> > could cleanup error paths like this a little.  Looks good though.
>
> The first thing Xfree (what xfree() is) does is check if the pointer is
> null and return if so.

You're right. Xfree (and free as well) does seem to handle this. However many 
places this check is made in the code anyway, and there's a comment 
complaining about this 0-pointer check in Xfree as well..

Where do we want to have this check?

Thanks!
 Magnus V



More information about the xorg mailing list