mirror of
https://github.com/git/git.git
synced 2024-12-03 23:14:23 +08:00
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:
commit
0078a75985
@ -3,3 +3,9 @@ expression E;
|
||||
@@
|
||||
- if (E)
|
||||
free(E);
|
||||
|
||||
@@
|
||||
expression E;
|
||||
@@
|
||||
- if (!E)
|
||||
free(E);
|
||||
|
Loading…
Reference in New Issue
Block a user