diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp index 3dcdc39b904d..413f068d4906 100644 --- a/llvm/unittests/ADT/StringMapTest.cpp +++ b/llvm/unittests/ADT/StringMapTest.cpp @@ -191,6 +191,7 @@ TEST_F(StringMapTest, StringMapEntryTest) { testKeyFirst, testKeyFirst + testKeyLength, 1u); EXPECT_STREQ(testKey, entry->first()); EXPECT_EQ(1u, entry->second); + free(entry); } // Test insert() method.