mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 17:56: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 not, close the file if opened.
|
||||||
if (F && *F) {
|
if (F && *F) {
|
||||||
(*F)->close();
|
(*F)->close();
|
||||||
|
delete *F;
|
||||||
*F = nullptr;
|
*F = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user