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

Peter Hutterer peter.hutterer at who-t.net
Wed Nov 10 14:23:54 PST 2010


On Wed, Nov 10, 2010 at 06:05:18PM +0300, Mikhail Gusarov wrote:
> 
> 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>

I've merged this patch into my tree. Thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list