From e53c219e05cc4bbfa9bf180ddcf6be5812f9a369 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Sat, 13 Jun 2020 09:15:03 +0900 Subject: [PATCH] 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 --- src/apps/mail/WIndex.cpp | 1 + 1 file changed, 1 insertion(+) 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;