aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-02-24 21:56:20 -0500
committerJohn Thacker <johnthacker@gmail.com>2023-02-25 18:50:56 +0000
commit641434ff81d454ef6ffa0c164a969fcb5b850cff (patch)
tree58001329b8216373557d937c5f683c7a4b3115f6 /ui
parentb1460bff699f56886386388cd559b2526735ed61 (diff)
Qt: Fix leak in Coloring Rules Dialog
We don't need the cloned color_filter_t after the ColoringRuleItem has been created (the char* strings are copied into QStrings), so free it.
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/models/coloring_rules_model.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/qt/models/coloring_rules_model.cpp b/ui/qt/models/coloring_rules_model.cpp
index a13d60eacb..dced9c3774 100644
--- a/ui/qt/models/coloring_rules_model.cpp
+++ b/ui/qt/models/coloring_rules_model.cpp
@@ -130,6 +130,7 @@ void ColoringRulesModel::addColor(color_filter_t* colorf)
beginInsertRows(QModelIndex(), count, count);
ColoringRuleItem* item = new ColoringRuleItem(colorf, root_);
+ color_filter_delete(colorf);
root_->appendChild(item);
endInsertRows();
}