On Mon, 2009-12-28 at 11:09 +0100, ext Mikhail Gusarov wrote:
> Twas brillig at 12:02:58 28.12.2009 UTC+02 when [email protected] did 
> gyre and gimble:
> 
>  OM> + if (newpoints)
>  OM> +     xfree (newpoints);
> 
> Which is equivalent to
> 
> if (newpoints)
>   if (newpoints)
>     free(newpoints);
> 
> And free(3) already handles NULL pointer safely: "If ptr is NULL, no
> operation is performed."

Okay, in that case this patch just becomes adding the two lines:

xfree (newpoints);
xfree (newwidths);

and we don't need to care about any checking of our own. I'll send the
v2 patch.

-- Oliver.

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to