RichManglingContext::FromCxxMethodName allocates a m_cxx_method_parser, but never deletes it.
This fixes a -DLLVM_USE_SANITIZER=Leaks failure.
Differential D100795
[lldb] Fix RichManglingContext::FromCxxMethodName() leak rupprecht on Apr 19 2021, 2:35 PM. Authored by
Details RichManglingContext::FromCxxMethodName allocates a m_cxx_method_parser, but never deletes it. This fixes a -DLLVM_USE_SANITIZER=Leaks failure.
Diff Detail
Event Timeline
Comment Actions LGTM, thanks for fixing this! We don't really have a thread for keep track of what other leak sanitiser failures needs to be fixed, but I believe with this revision (+ the revisions that I have to land) the only leaks left are related to reproducers or Python.
Comment Actions Thank you for reforactoring into ResetCxxMethodParser.
|
Instead of managing memory by hand, can we use a unique_ptr<char[]> instead?