mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 15:26:06 +00:00
Fix memory leak in FileSystemStatCache.
Patch by Guochun Shi. llvm-svn: 212466
This commit is contained in:
parent
575180dbd2
commit
1f6f6e60ad
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user