[PATCH 4/4] Coverity: mi/mispans.c: leaked_storage: Variable "newpoints" and "newwidths" goes out of scope

Mikhail Gusarov dottedmag at dottedmag.net
Mon Dec 28 02:09:15 PST 2009


Twas brillig at 12:02:58 28.12.2009 UTC+02 when oliver.mcfadden at nokia.com 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."

-- 
  http://fossarchy.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091228/bea174b5/attachment.pgp 


More information about the xorg-devel mailing list