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

16 lines
181 B
Plaintext
Raw Normal View History

@@
expression p, q;
@@
- free(p);
- p = q;
- q = NULL;
- return 0;
+ return free_and_replace(p, q);
@@
expression p, q;
@@
- free(p);
- p = q;
- q = NULL;
+ free_and_replace(p, q);