From b36570e51fd0d1fe52c19129c51e089ef93422bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 6 Feb 2009 16:48:03 +0000 Subject: [PATCH] Do proper unlocking of the KPath when find_directory() fails. This should help with CD boot where find_directory() can't create folders on a read-only media. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29139 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/device_manager/legacy_drivers.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/device_manager/legacy_drivers.cpp b/src/system/kernel/device_manager/legacy_drivers.cpp index 84248c78bb..21891b6c1b 100644 --- a/src/system/kernel/device_manager/legacy_drivers.cpp +++ b/src/system/kernel/device_manager/legacy_drivers.cpp @@ -837,7 +837,8 @@ DirectoryIterator::SetTo(const char* path, const char* subPath, bool recursive) pathBuffer.UnlockBuffer(); pathBuffer.Append("kernel"); AddPath(pathBuffer.Path(), subPath); - } + } else + pathBuffer.UnlockBuffer(); } } else AddPath(path, subPath); @@ -1359,7 +1360,8 @@ legacy_driver_probe(const char* subPath) start_watching(path.Path(), "dev"); start_watching(path.Path(), "bin"); - } + } else + path.UnlockBuffer(); } sWatching = true;