aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
diff options
context:
space:
mode:
authorKonrad Kleine <kkleine@redhat.com>2019-10-08 15:56:02 +0000
committerKonrad Kleine <kkleine@redhat.com>2019-10-08 15:56:02 +0000
commit6d7fb29914e3dd9e7f7d7524c5f98367a1aa613a (patch)
treee3d992bbeffd56a9b0ccc743e91063fc5a2d7a10 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
parentd80c2520d9f8cb660bbd10b8ff7b78d7f03ad339 (diff)
downloadllvm-6d7fb29914e3dd9e7f7d7524c5f98367a1aa613a.zip
llvm-6d7fb29914e3dd9e7f7d7524c5f98367a1aa613a.tar.gz
llvm-6d7fb29914e3dd9e7f7d7524c5f98367a1aa613a.tar.bz2
[lldb] Avoid resource leak
Summary: Before the pointer variable `args_dict` was assigned the result of an allocation with `new` and then `args_dict` is passed to `GetValueForKeyAsDictionary` which immediatly and unconditionally assigns `args_dict` to `nullptr`: ``` bool GetValueForKeyAsDictionary(llvm::StringRef key, Dictionary *&result) const { result = nullptr; ``` This caused a memory leak which was found in my coverity scan instance under CID 224753: https://scan.coverity.com/projects/kwk-llvm-project. Reviewers: jankratochvil, teemperor Reviewed By: teemperor Subscribers: teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68638 llvm-svn: 374071
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
0 files changed, 0 insertions, 0 deletions