[all-commits] [llvm/llvm-project] 1fe720: [LLDB][NFC] Fix memory leak in IntstumentationRunt...
fixathon via All-commits
all-commits at lists.llvm.org
Tue Aug 16 14:35:10 PDT 2022
Author: Slava Gurevich <sgurevich at gmail.com>
Date: 2022-08-16 (Tue, 16 Aug 2022)
[LLDB][NFC] Fix memory leak in IntstumentationRuntimeTSan.cpp
ConvertToStructuredArray() relies on its caller to deallocate the heap-allocated object pointer it returns. One of its call-sites, in GetRenumberedThreadIds(), fails to deallocate causing a memory/resource leak. Fix the memory leak by converting the return type to shared_ptr, and clean up the rest of the file to use the typedef-ed shared_ptr types for StructuredData for safety and consistency.
Differential Revision: https://reviews.llvm.org/D131900
More information about the All-commits