Revert "Partitioning system: avoid leakage of resource"
This reverts commit f6bd30f2af.
This commit is contained in:
@@ -54,14 +54,10 @@ identify_partition(int fd, partition_data *partition, void **cookie)
|
|||||||
if (disc != NULL && disc->InitCheck() == B_OK) {
|
if (disc != NULL && disc->InitCheck() == B_OK) {
|
||||||
// If we have only a single session then we can let the file system
|
// If we have only a single session then we can let the file system
|
||||||
// drivers play directly with the device.
|
// drivers play directly with the device.
|
||||||
Session *session = disc->GetSession(1);
|
if (disc->GetSession(1) != NULL)
|
||||||
if (session != NULL) {
|
|
||||||
result = 0.9f;
|
result = 0.9f;
|
||||||
delete session;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
result = 0.1f;
|
result = 0.1f;
|
||||||
|
|
||||||
*cookie = static_cast<void*>(disc);
|
*cookie = static_cast<void*>(disc);
|
||||||
} else
|
} else
|
||||||
delete disc;
|
delete disc;
|
||||||
|
|||||||
Reference in New Issue
Block a user