1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
systemd/coccinelle/mfree_return.cocci

10 lines
251 B
Plaintext
Raw Normal View History

/* SPDX-License-Identifier: LGPL-2.1-or-later */
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);