diff --git a/src/apps/mail/WIndex.cpp b/src/apps/mail/WIndex.cpp index 76b38da4ba..8f27a5e8ab 100644 --- a/src/apps/mail/WIndex.cpp +++ b/src/apps/mail/WIndex.cpp @@ -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;