Merge branch 'jc/cocci-free-updates' into jch
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)" conversionjch
commit
548b342aa0
|
|
@ -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);
|
||||
)
|
||||
|
||||
@@
|
||||
|
|
|
|||
Loading…
Reference in New Issue