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:
@ -3,3 +3,9 @@ expression E;
|
|||||||
@@
|
@@
|
||||||
- if (E)
|
- if (E)
|
||||||
free(E);
|
free(E);
|
||||||
|
|
||||||
|
@@
|
||||||
|
expression E;
|
||||||
|
@@
|
||||||
|
- if (!E)
|
||||||
|
free(E);
|
||||||
|
|||||||
Reference in New Issue
Block a user