Mail: Fix PVS V773
Fix WIndex::SetTo() was exited without releasing 'dataFile' pointer. Change-Id: I4bb3f818d08ffca48ce5059d47471f8fe36040f0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2909 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
f612d852cf
commit
e53c219e05
|
@ -80,6 +80,7 @@ WIndex::SetTo(const char *dataPath, const char *indexPath)
|
||||||
dataFile = new BFile();
|
dataFile = new BFile();
|
||||||
|
|
||||||
if (dataFile->SetTo(dataPath, B_READ_ONLY) != B_OK) {
|
if (dataFile->SetTo(dataPath, B_READ_ONLY) != B_OK) {
|
||||||
|
delete dataFile;
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
} else {
|
} else {
|
||||||
bool buildIndex = true;
|
bool buildIndex = true;
|
||||||
|
|
Loading…
Reference in New Issue