[PATCH] Remove superfluous if(p!=NULL) checks around free(p); p=NULL;

Mikhail Gusarov dottedmag at dottedmag.net
Wed Nov 10 07:05:18 PST 2010


Twas brillig at 16:06:10 10.11.2010 UTC+01 when kibi at debian.org did gyre and gimble:

 CB> This patch has been generated by the following Coccinelle semantic patch:

 CB> @@
 CB> expression E;
 CB> @@
 CB> -  if (E != NULL) {
 CB> -   free(E);
 CB> (
 CB> -   E = NULL;
 CB> |
 CB> -   E = 0;
 CB> )
 CB> -  }
 CB> + free(E);
 CB> + E = NULL;

 CB> Signed-off-by: Cyril Brulebois <kibi at debian.org>

Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>

-- 
  http://fossarchy.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101110/bada82d0/attachment.pgp>


More information about the xorg-devel mailing list