From 63d56be3d9572991b7a4ede8feab69c4b4de5152 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 26 Oct 2013 01:44:11 +0200 Subject: [PATCH] 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. --- src/system/boot/loader/vfs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/boot/loader/vfs.cpp b/src/system/boot/loader/vfs.cpp index 21d02c8183..2aa2ecc022 100644 --- a/src/system/boot/loader/vfs.cpp +++ b/src/system/boot/loader/vfs.cpp @@ -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);