about summary refs log tree commit diff
path: root/contrib/coccinelle/free.cocci
blob: 4490069df9650df6be58a8ad3f566329f7afd6ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@@
expression E;
@@
- if (E)
  free(E);

@@
expression E;
@@
- if (!E)
  free(E);

@@
expression E;
@@
- free(E);
+ FREE_AND_NULL(E);
- E = NULL;