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 @@ -1448,7 +1448,7 @@ static int ntlm_authenticate(struct ksmbd_work *work,
1448
1448
{
1449
1449
struct ksmbd_conn * conn = work -> conn ;
1450
1450
struct ksmbd_session * sess = work -> sess ;
1451
- struct channel * chann = NULL ;
1451
+ struct channel * chann = NULL , * old ;
1452
1452
struct ksmbd_user * user ;
1453
1453
u64 prev_id ;
1454
1454
int sz , rc ;
@@ -1560,7 +1560,12 @@ static int ntlm_authenticate(struct ksmbd_work *work,
1560
1560
return - ENOMEM ;
1561
1561
1562
1562
chann -> conn = conn ;
1563
- xa_store (& sess -> ksmbd_chann_list , (long )conn , chann , KSMBD_DEFAULT_GFP );
1563
+ old = xa_store (& sess -> ksmbd_chann_list , (long )conn , chann ,
1564
+ KSMBD_DEFAULT_GFP );
1565
+ if (xa_is_err (old )) {
1566
+ kfree (chann );
1567
+ return xa_err (old );
1568
+ }
1564
1569
}
1565
1570
}
1566
1571
You can’t perform that action at this time.
0 commit comments