From 1f6f6e60adf754fa57c31f7bdeede46aec1f7dc9 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Mon, 7 Jul 2014 17:00:49 +0000 Subject: [PATCH] Fix memory leak in FileSystemStatCache. Patch by Guochun Shi. llvm-svn: 212466 --- clang/lib/Basic/FileSystemStatCache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp index 61f745d..4952ef4 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; } -- 2.7.4