[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
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1fe72001e8d69cae1975a360fee055c2fd3730f4
https://github.com/llvm/llvm-project/commit/1fe72001e8d69cae1975a360fee055c2fd3730f4
Author: Slava Gurevich <sgurevich at gmail.com>
Date: 2022-08-16 (Tue, 16 Aug 2022)
Changed paths:
M lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
Log Message:
-----------
[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
mailing list