Fix missing reference to the old group with lock still held.
Removing the team from the group may have released the last reference to the group and freed it. Since we still have a locker on that group it would later crash on unlock, therefore we need a reference to the old group before removing the team from it.
This commit is contained in:
@@ -4037,6 +4037,7 @@ _user_setsid(void)
|
||||
return B_NOT_ALLOWED;
|
||||
|
||||
// remove the team from the old and add it to the new process group
|
||||
BReference<ProcessGroup> oldGroupReference(team->group);
|
||||
remove_team_from_group(team);
|
||||
group->Publish(session);
|
||||
insert_team_into_group(group, team);
|
||||
|
||||
Reference in New Issue
Block a user