Welcome to mirror list, hosted at ThFree Co, Russian Federation.

free.cocci « coccinelle « contrib - git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f2d97e755b891aac988121212a3bb2188b3a150a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@@
expression E;
@@
- if (E)
  free(E);

@@
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);