diff options
author | Slava Gurevich <sgurevich@gmail.com> | 2022-08-15 02:25:42 -0700 |
---|---|---|
committer | Slava Gurevich <sgurevich@gmail.com> | 2022-08-16 14:34:50 -0700 |
commit | 1fe72001e8d69cae1975a360fee055c2fd3730f4 (patch) | |
tree | d536af99354219ecb6701b05c65e61c2f5ca294a /llvm/lib/Transforms/Utils/BuildLibCalls.cpp | |
parent | d68ba43ad24791181280fdb0f34b6be380db7a32 (diff) | |
download | llvm-1fe72001e8d69cae1975a360fee055c2fd3730f4.zip llvm-1fe72001e8d69cae1975a360fee055c2fd3730f4.tar.gz llvm-1fe72001e8d69cae1975a360fee055c2fd3730f4.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/Transforms/Utils/BuildLibCalls.cpp')
0 files changed, 0 insertions, 0 deletions