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 @@ -1609,7 +1609,7 @@ static int krb5_authenticate(struct ksmbd_work *work,
1609
1609
struct ksmbd_conn * conn = work -> conn ;
1610
1610
struct ksmbd_session * sess = work -> sess ;
1611
1611
char * in_blob , * out_blob ;
1612
- struct channel * chann = NULL ;
1612
+ struct channel * chann = NULL , * old ;
1613
1613
u64 prev_sess_id ;
1614
1614
int in_len , out_len ;
1615
1615
int retval ;
@@ -1675,7 +1675,12 @@ static int krb5_authenticate(struct ksmbd_work *work,
1675
1675
return - ENOMEM ;
1676
1676
1677
1677
chann -> conn = conn ;
1678
- xa_store (& sess -> ksmbd_chann_list , (long )conn , chann , KSMBD_DEFAULT_GFP );
1678
+ old = xa_store (& sess -> ksmbd_chann_list , (long )conn ,
1679
+ chann , KSMBD_DEFAULT_GFP );
1680
+ if (xa_is_err (old )) {
1681
+ kfree (chann );
1682
+ return xa_err (old );
1683
+ }
1679
1684
}
1680
1685
}
1681
1686
You can’t perform that action at this time.
0 commit comments