boot loader: BootVolume::SetTo(): Fix reference counting

We release the reference for fRootDirectory in Unset() but never
acquired one. Fixes crash when selecting a boot volume in the menu.
This commit is contained in:
Ingo Weinhold
2013-10-26 01:44:11 +02:00
parent 3f40dcb6b4
commit 63d56be3d9
+1
View File
@@ -424,6 +424,7 @@ BootVolume::SetTo(Directory* rootDirectory)
return B_BAD_VALUE;
fRootDirectory = rootDirectory;
fRootDirectory->Acquire();
// find the system directory
Node* systemNode = fRootDirectory->Lookup("system", true);