зеркало из https://github.com/microsoft/git.git
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:
Коммит
0078a75985
|
@ -3,3 +3,9 @@ expression E;
|
|||
@@
|
||||
- if (E)
|
||||
free(E);
|
||||
|
||||
@@
|
||||
expression E;
|
||||
@@
|
||||
- if (!E)
|
||||
free(E);
|
||||
|
|
Загрузка…
Ссылка в новой задаче