Merge branch 'jc/cocci-free-updates'

Updates to Coccinelle semantic patches to correctly handle the
'FREE_AND_NULL()' macro and avoid generating broken transformations
for negated pointer checks.

* jc/cocci-free-updates:
  cocci: FREE_AND_NULL(E) is safe to call on NULL
  cocci: remove risky "if (!E) free(E)" conversion
This commit is contained in:
Junio C Hamano committed 2026-10-01 11:26:40 -07:00
commit d08565d2c6
1 file changed
+1 -9
+1 -9
View File
@@ -6,16 +6,8 @@ expression E;
free(E);
|
commit_list_free(E);
)
@@
expression E;
@@
- if (!E)
(
free(E);
|
commit_list_free(E);
FREE_AND_NULL(E);
)
@@