Merge branch 'rs/cocci-check-free-only-null'

A new coccinelle rule that catches a check of !pointer before the
pointer is free(3)d, which most likely is a bug.

* rs/cocci-check-free-only-null:
  cocci: detect useless free(3) calls
This commit is contained in:
Junio C Hamano 2017-02-16 14:45:13 -08:00
commit 0078a75985

View File

@ -3,3 +3,9 @@ expression E;
@@
- if (E)
free(E);
@@
expression E;
@@
- if (!E)
free(E);