* Unlock the auto locker before deleting the object or else you will find

yourself in KDL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34158 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-11-20 16:33:09 +00:00
parent 54ca879739
commit 5cea99288b

View File

@ -697,6 +697,7 @@ KDiskDeviceManager::CreateDevice(const char* path, bool* newlyCreated)
// cleanup on error
if (error != B_OK) {
deviceLocker.Unlock();
delete device;
return error;
}
@ -791,6 +792,7 @@ KDiskDeviceManager::CreateFileDevice(const char* filePath, bool* newlyCreated)
}
// cleanup on failure
deviceLocker.Unlock();
delete device;
} else
error = B_ERROR;