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