tvl-depot/third_party/git/contrib/coccinelle/free.cocci

19 lines
146 B
Text
Raw Normal View History

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