* 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:
parent
54ca879739
commit
5cea99288b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user