diff options
author | Manuel Klimek <klimek@google.com> | 2014-07-07 17:00:49 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2014-07-07 17:00:49 +0000 |
commit | 1f6f6e60adf754fa57c31f7bdeede46aec1f7dc9 (patch) | |
tree | b835dc499e27c58f447602d549cba953e419d717 /clang/lib/Basic/FileSystemStatCache.cpp | |
parent | 575180dbd29882d566b79a91af3f947fde7525fb (diff) | |
download | bcm5719-llvm-1f6f6e60adf754fa57c31f7bdeede46aec1f7dc9.tar.gz bcm5719-llvm-1f6f6e60adf754fa57c31f7bdeede46aec1f7dc9.zip |
Fix memory leak in FileSystemStatCache.
Patch by Guochun Shi.
llvm-svn: 212466
Diffstat (limited to 'clang/lib/Basic/FileSystemStatCache.cpp')
-rw-r--r-- | clang/lib/Basic/FileSystemStatCache.cpp | 1 |
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; } |