]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/free_and_replace.cocci
test: also flush and rotate journal before read
[thirdparty/systemd.git] / coccinelle / free_and_replace.cocci
CommitLineData
64b92d63 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
3b319885
ZJS
2@@
3expression p, q;
4@@
5- free(p);
6- p = q;
7- q = NULL;
8- return 0;
9+ return free_and_replace(p, q);
10@@
11expression p, q;
12@@
13- free(p);
14- p = q;
15- q = NULL;
16+ free_and_replace(p, q);