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:
Michael Lotz
2008-09-13 19:38:52 +00:00
parent 7c57e58de9
commit 28f362c129
@@ -53,9 +53,8 @@ identify_partition(int fd, partition_data *partition, void **cookie)
if (disc && disc->InitCheck() == B_OK) {
*cookie = static_cast<void*>(disc);
result = 0.7;
}
delete disc;
} else
delete disc;
}
PRINT(("returning %ld\n", int32(result * 10000)));
return result;