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:
Murai Takashi 2020-06-13 09:15:03 +09:00 committed by waddlesplash
parent f612d852cf
commit e53c219e05
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ WIndex::SetTo(const char *dataPath, const char *indexPath)
dataFile = new BFile();
if (dataFile->SetTo(dataPath, B_READ_ONLY) != B_OK) {
delete dataFile;
return B_ERROR;
} else {
bool buildIndex = true;