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,
11621162 return res ;
11631163
11641164 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 );
11661167 return SVC_DENIED ;
1168+ }
11671169
11681170 pages = DIV_ROUND_UP (inlen , PAGE_SIZE );
11691171 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 );
11711174 return SVC_DENIED ;
1175+ }
11721176 in_token -> page_base = 0 ;
11731177 in_token -> page_len = inlen ;
11741178 for (i = 0 ; i < pages ; i ++ ) {
11751179 in_token -> pages [i ] = alloc_page (GFP_KERNEL );
11761180 if (!in_token -> pages [i ]) {
1181+ kfree (in_handle -> data );
11771182 gss_free_in_token_pages (in_token );
11781183 return SVC_DENIED ;
11791184 }
You can’t perform that action at this time.
0 commit comments