Fix memory leak in FileSystemStatCache.

Patch by Guochun Shi.

llvm-svn: 212466
This commit is contained in:
Manuel Klimek 2014-07-07 17:00:49 +00:00
parent 575180dbd2
commit 1f6f6e60ad

View File

@ -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;
}