Systemd/coccinelle/mfree_return.cocci

9 lines
202 B
Plaintext
Raw Normal View History

2016-10-17 00:28:30 +02:00
@@
/* Avoid running this transformation on the mfree function itself */
position p : script:python() { p[0].current_element != "mfree" };
expression e;
2016-10-17 00:28:30 +02:00
@@
- free@p(e);
2016-10-17 00:28:30 +02:00
- return NULL;
+ return mfree(e);