File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1162,18 +1162,23 @@ static int gss_read_proxy_verf(struct svc_rqst *rqstp,
1162
1162
return res ;
1163
1163
1164
1164
inlen = svc_getnl (argv );
1165
- if (inlen > (argv -> iov_len + rqstp -> rq_arg .page_len ))
1165
+ if (inlen > (argv -> iov_len + rqstp -> rq_arg .page_len )) {
1166
+ kfree (in_handle -> data );
1166
1167
return SVC_DENIED ;
1168
+ }
1167
1169
1168
1170
pages = DIV_ROUND_UP (inlen , PAGE_SIZE );
1169
1171
in_token -> pages = kcalloc (pages , sizeof (struct page * ), GFP_KERNEL );
1170
- if (!in_token -> pages )
1172
+ if (!in_token -> pages ) {
1173
+ kfree (in_handle -> data );
1171
1174
return SVC_DENIED ;
1175
+ }
1172
1176
in_token -> page_base = 0 ;
1173
1177
in_token -> page_len = inlen ;
1174
1178
for (i = 0 ; i < pages ; i ++ ) {
1175
1179
in_token -> pages [i ] = alloc_page (GFP_KERNEL );
1176
1180
if (!in_token -> pages [i ]) {
1181
+ kfree (in_handle -> data );
1177
1182
gss_free_in_token_pages (in_token );
1178
1183
return SVC_DENIED ;
1179
1184
}
You can’t perform that action at this time.
0 commit comments