summaryrefslogtreecommitdiffstats
path: root/coccinelle/mfree_return.cocci
blob: c2c4cb3209e8241a83ca7e29333db7ab2845b397 (plain)
1
2
3
4
5
6
7
8
9
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* Avoid running this transformation on the mfree function itself */
position p : script:python() { p[0].current_element != "mfree" };
expression e;
@@
- free@p(e);
- return NULL;
+ return mfree(e);