1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00
systemd-stable/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);