Fix memory leak in FileSystemStatCache.
Patch by Guochun Shi. llvm-svn: 212466
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user