Again fix the previous commit. Obviously we only want to delete the disc object
if it actually failed to initialize. Thanks Stephan for spotting that. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27497 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -53,9 +53,8 @@ identify_partition(int fd, partition_data *partition, void **cookie)
|
|||||||
if (disc && disc->InitCheck() == B_OK) {
|
if (disc && disc->InitCheck() == B_OK) {
|
||||||
*cookie = static_cast<void*>(disc);
|
*cookie = static_cast<void*>(disc);
|
||||||
result = 0.7;
|
result = 0.7;
|
||||||
}
|
} else
|
||||||
|
delete disc;
|
||||||
delete disc;
|
|
||||||
}
|
}
|
||||||
PRINT(("returning %ld\n", int32(result * 10000)));
|
PRINT(("returning %ld\n", int32(result * 10000)));
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user