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:
@@ -424,6 +424,7 @@ BootVolume::SetTo(Directory* rootDirectory)
|
|||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
fRootDirectory = rootDirectory;
|
fRootDirectory = rootDirectory;
|
||||||
|
fRootDirectory->Acquire();
|
||||||
|
|
||||||
// find the system directory
|
// find the system directory
|
||||||
Node* systemNode = fRootDirectory->Lookup("system", true);
|
Node* systemNode = fRootDirectory->Lookup("system", true);
|
||||||
|
|||||||
Reference in New Issue
Block a user