summaryrefslogtreecommitdiff
path: root/coccinelle/strv_free.cocci
blob: 8eddfc566ed2fdec11069a14dda09e16eb18ddc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression p;
@@
- strv_free(p);
- p = NULL;
+ p = strv_free(p);
@@
expression p;
@@
- if (p)
-         strv_free(p);
- p = NULL;
+ p = strv_free(p);
@@
expression p;
@@
- if (p) {
-         strv_free(p);
-         p = NULL;
- }
+ p = strv_free(p);
@@
expression p;
@@
- if (p)
-         strv_free(p);
+ strv_free(p);