r212466 - Fix memory leak in FileSystemStatCache.
Manuel Klimek
klimek at google.com
Mon Jul 7 10:00:49 PDT 2014
Author: klimek
Date: Mon Jul 7 12:00:49 2014
New Revision: 212466
URL: http://llvm.org/viewvc/llvm-project?rev=212466&view=rev
Log:
Fix memory leak in FileSystemStatCache.
Patch by Guochun Shi.
Modified:
cfe/trunk/lib/Basic/FileSystemStatCache.cpp
Modified: cfe/trunk/lib/Basic/FileSystemStatCache.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/FileSystemStatCache.cpp?rev=212466&r1=212465&r2=212466&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/FileSystemStatCache.cpp (original)
+++ cfe/trunk/lib/Basic/FileSystemStatCache.cpp Mon Jul 7 12:00:49 2014
@@ -111,6 +111,7 @@ bool FileSystemStatCache::get(const char
// If not, close the file if opened.
if (F && *F) {
(*F)->close();
+ delete *F;
*F = nullptr;
}
More information about the cfe-commits
mailing list