This revision was automatically updated to reflect the committed changes.
Closed by commit rG6d7fb29914e3: [lldb] Avoid resource leak (authored by kwk).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68638/new/

https://reviews.llvm.org/D68638

Files:
  lldb/source/Breakpoint/BreakpointResolverScripted.cpp


Index: lldb/source/Breakpoint/BreakpointResolverScripted.cpp
===================================================================
--- lldb/source/Breakpoint/BreakpointResolverScripted.cpp
+++ lldb/source/Breakpoint/BreakpointResolverScripted.cpp
@@ -92,7 +92,7 @@
   depth = (lldb::SearchDepth) depth_as_int;
   
   StructuredDataImpl *args_data_impl = new StructuredDataImpl();
-  StructuredData::Dictionary *args_dict = new StructuredData::Dictionary();
+  StructuredData::Dictionary *args_dict = nullptr;
   success = options_dict.GetValueForKeyAsDictionary(
     GetKey(OptionNames::ScriptArgs), args_dict);
   if (success) {


Index: lldb/source/Breakpoint/BreakpointResolverScripted.cpp
===================================================================
--- lldb/source/Breakpoint/BreakpointResolverScripted.cpp
+++ lldb/source/Breakpoint/BreakpointResolverScripted.cpp
@@ -92,7 +92,7 @@
   depth = (lldb::SearchDepth) depth_as_int;
   
   StructuredDataImpl *args_data_impl = new StructuredDataImpl();
-  StructuredData::Dictionary *args_dict = new StructuredData::Dictionary();
+  StructuredData::Dictionary *args_dict = nullptr;
   success = options_dict.GetValueForKeyAsDictionary(
     GetKey(OptionNames::ScriptArgs), args_dict);
   if (success) {
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PAT... Konrad Wilhelm Kleine via Phabricator via lldb-commits
    • [Lldb-commits]... Raphael Isemann via Phabricator via lldb-commits
    • [Lldb-commits]... Konrad Wilhelm Kleine via Phabricator via lldb-commits

Reply via email to