aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-25 14:07:58 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 19:27:03 -0700
commit77195ccb88aab66a5d138ca1e09324e482f897ac (patch)
tree838168d71491dd3544e987fa2a50a4fccb5854af /core
parente7b56c2d315c31ec64696dbaca9550071633aef4 (diff)
downloadsubsurface-77195ccb88aab66a5d138ca1e09324e482f897ac.tar.gz
cleanup: fix resource leak
And address typo in comment. Fixes CID 362915 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/save-git.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/save-git.c b/core/save-git.c
index e875d2fb4..bdc08fef6 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -957,7 +957,7 @@ static void format_one_filter_constraint(int preset_id, int constraint_id, struc
/*
* Write a filter constraint to the membuffer b.
* Each line starts with a type, which is either "name", "fulltext" or "constraint".
- * There must be one "name" entry, zero or ont "fulltext" entries and an arbitrary number of "contraint" entries.
+ * There must be one "name" entry, zero or one "fulltext" entries and an arbitrary number of "contraint" entries.
* The "name" entry gives the name of the filter constraint.
* The "fulltext" entry has the format
* fulltext mode "fulltext mode" query "the query as entered by the user"
@@ -976,6 +976,7 @@ static void format_one_filter_preset(int preset_id, struct membuffer *b)
show_utf8(b, "fulltext mode=", filter_preset_fulltext_mode(preset_id), "");
show_utf8(b, " query=", fulltext, "\n");
}
+ free(fulltext);
for (int i = 0; i < filter_preset_constraint_count(preset_id); i++)
format_one_filter_constraint(preset_id, i, b);