Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'rs/obsd-getcwd-workaround' into next
[gitweb.git]
/
contrib
/
coccinelle
/
free.cocci
diff --git
a/contrib/coccinelle/free.cocci
b/contrib/coccinelle/free.cocci
index f2d97e755b891aac988121212a3bb2188b3a150a..4490069df9650df6be58a8ad3f566329f7afd6ae 100644
(file)
--- a/
contrib/coccinelle/free.cocci
+++ b/
contrib/coccinelle/free.cocci
@@
-10,17
+10,9
@@
expression E;
- if (!E)
free(E);
-@@
-type T;
-T *ptr;
-@@
-- free(ptr);
-- ptr = NULL;
-+ FREE_AND_NULL(ptr);
-
@@
expression E;
@@
- free(E);
-- E = NULL;
+ FREE_AND_NULL(E);
+- E = NULL;