1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 06:52:22 +03:00
systemd/coccinelle/mfree_return.cocci

9 lines
202 B
Plaintext
Raw Normal View History

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