[Sanitizers] Fix a memory leak.
authorChih-Ping Chen <chih-ping.chen@intel.com>
Tue, 28 Mar 2023 12:47:13 +0000 (08:47 -0400)
committerChih-Ping Chen <chih-ping.chen@intel.com>
Tue, 28 Mar 2023 12:47:13 +0000 (08:47 -0400)
Differential Revision: https://reviews.llvm.org/D146756

compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cpp

index a674034..f381852 100644 (file)
@@ -86,6 +86,7 @@ void SuppressionContext::ParseFromFile(const char *filename) {
   }
 
   Parse(file_contents);
+  UnmapOrDie(file_contents, contents_size);
 }
 
 bool SuppressionContext::Match(const char *str, const char *type,