File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -100,20 +100,20 @@ static int __init test_gen_kprobe_cmd(void)
100
100
KPROBE_GEN_TEST_FUNC ,
101
101
KPROBE_GEN_TEST_ARG0 , KPROBE_GEN_TEST_ARG1 );
102
102
if (ret )
103
- goto free ;
103
+ goto out ;
104
104
105
105
/* Use kprobe_event_add_fields to add the rest of the fields */
106
106
107
107
ret = kprobe_event_add_fields (& cmd , KPROBE_GEN_TEST_ARG2 , KPROBE_GEN_TEST_ARG3 );
108
108
if (ret )
109
- goto free ;
109
+ goto out ;
110
110
111
111
/*
112
112
* This actually creates the event.
113
113
*/
114
114
ret = kprobe_event_gen_cmd_end (& cmd );
115
115
if (ret )
116
- goto free ;
116
+ goto out ;
117
117
118
118
/*
119
119
* Now get the gen_kprobe_test event file. We need to prevent
@@ -136,13 +136,11 @@ static int __init test_gen_kprobe_cmd(void)
136
136
goto delete ;
137
137
}
138
138
out :
139
+ kfree (buf );
139
140
return ret ;
140
141
delete :
141
142
/* We got an error after creating the event, delete it */
142
143
ret = kprobe_event_delete ("gen_kprobe_test" );
143
- free :
144
- kfree (buf );
145
-
146
144
goto out ;
147
145
}
148
146
@@ -170,14 +168,14 @@ static int __init test_gen_kretprobe_cmd(void)
170
168
KPROBE_GEN_TEST_FUNC ,
171
169
"$retval" );
172
170
if (ret )
173
- goto free ;
171
+ goto out ;
174
172
175
173
/*
176
174
* This actually creates the event.
177
175
*/
178
176
ret = kretprobe_event_gen_cmd_end (& cmd );
179
177
if (ret )
180
- goto free ;
178
+ goto out ;
181
179
182
180
/*
183
181
* Now get the gen_kretprobe_test event file. We need to
@@ -201,13 +199,11 @@ static int __init test_gen_kretprobe_cmd(void)
201
199
goto delete ;
202
200
}
203
201
out :
202
+ kfree (buf );
204
203
return ret ;
205
204
delete :
206
205
/* We got an error after creating the event, delete it */
207
206
ret = kprobe_event_delete ("gen_kretprobe_test" );
208
- free :
209
- kfree (buf );
210
-
211
207
goto out ;
212
208
}
213
209
You can’t perform that action at this time.
0 commit comments