Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ab/ref-filter-no-contains'
[gitweb.git]
/
contrib
/
coccinelle
/
free.cocci
diff --git
a/contrib/coccinelle/free.cocci
b/contrib/coccinelle/free.cocci
index c03ba737e5fafe63218c7023ce8bbd66c47f7dc5..4490069df9650df6be58a8ad3f566329f7afd6ae 100644
(file)
--- a/
contrib/coccinelle/free.cocci
+++ b/
contrib/coccinelle/free.cocci
@@
-9,3
+9,10
@@
expression E;
@@
- if (!E)
free(E);
+
+@@
+expression E;
+@@
+- free(E);
++ FREE_AND_NULL(E);
+- E = NULL;