From 2872aba0a779d4b4fceeaaa34c45be58a5b70e66 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 4 Dec 2011 20:14:24 +0100 Subject: [PATCH] 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. --- src/system/kernel/team.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/kernel/team.cpp b/src/system/kernel/team.cpp index 61903e53ff..00a7da17e6 100644 --- a/src/system/kernel/team.cpp +++ b/src/system/kernel/team.cpp @@ -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 oldGroupReference(team->group); remove_team_from_group(team); group->Publish(session); insert_team_into_group(group, team);