[Commits] [SCM] claws branch, master, updated. 3.18.0-166-ge1d431c55
wwp at claws-mail.org
wwp at claws-mail.org
Sun Sep 26 21:05:00 CEST 2021
The branch, master has been updated
via e1d431c550f6540a888e156a23db97b7450858ca (commit)
from 8dde5e6b4bd5b052ec2bf9bc12d7ca9714143cd5 (commit)
Summary of changes:
src/prefs_matcher.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit e1d431c550f6540a888e156a23db97b7450858ca
Author: wwp <subscript at free.fr>
Date: Sun Sep 26 21:04:34 2021 +0200
Fix CID 1491134, 1491173: resource leaks.
diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
index 94c17278c..1e8dc7df0 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -1500,6 +1500,7 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
gboolean case_sensitive;
const gchar *header;
const gchar *expr;
+ gboolean expr_to_free = FALSE;
gint value, sel;
gint year, month, day, hour, minute;
@@ -1578,6 +1579,7 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
alertpanel_error(_("Invalid hour."));
return NULL;
}
+ expr_to_free = TRUE;
break;
case CRITERIA_TEST:
@@ -1689,6 +1691,9 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
matcherprop = matcherprop_new(criteria, header, matchtype,
expr, value);
+ if (expr_to_free)
+ g_free(expr);
+
return matcherprop;
}
@@ -2170,14 +2175,15 @@ static void prefs_matcher_ok(void)
ALERTFOCUS_SECOND);
if (G_ALERTDEFAULT != val) {
g_free(matcher_str);
- g_free(str);
+ g_free(str);
+ matcherlist_free(matchers);
return;
}
}
g_free(matcher_str);
}
}
- g_free(str);
+ g_free(str);
gtk_widget_hide(matcher.window);
gtk_window_set_modal(GTK_WINDOW(matcher.window), FALSE);
if (matchers_callback != NULL)
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list