Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'rs/apply-avoid-over-reading'
[gitweb.git]
/
contrib
/
coccinelle
/
free.cocci
diff --git
a/contrib/coccinelle/free.cocci
b/contrib/coccinelle/free.cocci
index 35fb992621ff7c718d91258f4b8ac18a28db17ab..f2d97e755b891aac988121212a3bb2188b3a150a 100644
(file)
--- a/
contrib/coccinelle/free.cocci
+++ b/
contrib/coccinelle/free.cocci
@@
-17,3
+17,10
@@
T *ptr;
- free(ptr);
- ptr = NULL;
+ FREE_AND_NULL(ptr);
+
+@@
+expression E;
+@@
+- free(E);
+- E = NULL;
++ FREE_AND_NULL(E);