Systemd/coccinelle/mfree_return.cocci

9 lines
202 B
Plaintext

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