mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00: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 a new issue