[Lldb-commits] [lldb] r198178 - Fix a couple of memory leaks.
Jean-Daniel Dupas
devlists at shadowlab.org
Sun Dec 29 12:18:15 PST 2013
Author: jddupas
Date: Sun Dec 29 14:18:15 2013
New Revision: 198178
URL: http://llvm.org/viewvc/llvm-project?rev=198178&view=rev
Log:
Fix a couple of memory leaks.
Modified:
lldb/trunk/source/Commands/CommandObjectType.cpp
Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=198178&r1=198177&r2=198178&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Sun Dec 29 14:18:15 2013
@@ -1008,6 +1008,7 @@ protected:
param = new CommandObjectTypeFormatList_LoopCallbackParam(this,&result,NULL,cate_regex);
DataVisualization::Categories::LoopThrough(PerCategoryCallback,param);
+ delete param;
if (cate_regex)
delete cate_regex;
@@ -2190,7 +2191,8 @@ protected:
param = new CommandObjectTypeSummaryList_LoopCallbackParam(this,&result,NULL,cate_regex);
DataVisualization::Categories::LoopThrough(PerCategoryCallback,param);
-
+ delete param;
+
if (DataVisualization::NamedSummaryFormats::GetCount() > 0)
{
result.GetOutputStream().Printf("Named summaries:\n");
@@ -2753,6 +2755,7 @@ protected:
param = new CommandObjectTypeFilterList_LoopCallbackParam(this,&result,NULL,cate_regex);
DataVisualization::Categories::LoopThrough(PerCategoryCallback,param);
+ delete param;
if (cate_regex)
delete cate_regex;
@@ -2967,7 +2970,8 @@ protected:
param = new CommandObjectTypeSynthList_LoopCallbackParam(this,&result,NULL,cate_regex);
DataVisualization::Categories::LoopThrough(PerCategoryCallback,param);
-
+ delete param;
+
if (cate_regex)
delete cate_regex;
More information about the lldb-commits
mailing list