[Lldb-commits] [lldb] Free buffer to fix memory leak on test (PR #137979)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 30 08:28:45 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Ivan Tadeu Ferreira Antunes Filho (itf)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/137979.diff
1 Files Affected:
- (modified) lldb/unittests/Core/MangledTest.cpp (+1)
``````````diff
diff --git a/lldb/unittests/Core/MangledTest.cpp b/lldb/unittests/Core/MangledTest.cpp
index aaca4270d708a..44651eb94c23b 100644
--- a/lldb/unittests/Core/MangledTest.cpp
+++ b/lldb/unittests/Core/MangledTest.cpp
@@ -605,6 +605,7 @@ TEST_P(DemanglingPartsTestFixture, DemanglingParts) {
EXPECT_EQ(get_part(OB.NameInfo.BasenameRange), basename);
EXPECT_EQ(get_part(OB.NameInfo.ScopeRange), scope);
EXPECT_EQ(get_part(OB.NameInfo.QualifiersRange), qualifiers);
+ std::free(OB.getBuffer());
}
INSTANTIATE_TEST_SUITE_P(DemanglingPartsTests, DemanglingPartsTestFixture,
``````````
</details>
https://github.com/llvm/llvm-project/pull/137979
More information about the lldb-commits
mailing list