summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/FileSystemStatCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/FileSystemStatCache.cpp')
-rw-r--r--clang/lib/Basic/FileSystemStatCache.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp
index 61f745d8bba..4952ef49ef8 100644
--- a/clang/lib/Basic/FileSystemStatCache.cpp
+++ b/clang/lib/Basic/FileSystemStatCache.cpp
@@ -111,6 +111,7 @@ bool FileSystemStatCache::get(const char *Path, FileData &Data, bool isFile,
// If not, close the file if opened.
if (F && *F) {
(*F)->close();
+ delete *F;
*F = nullptr;
}
OpenPOWER on IntegriCloud