[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-224-g63db37ff1

wwp at claws-mail.org wwp at claws-mail.org
Sun Sep 26 21:05:05 CEST 2021


The branch, gtk3 has been updated
       via  63db37ff1d65e6b294819c50c1487f7fd880da2c (commit)
      from  2e626bf179777336beccb385b817465bf64c4a34 (commit)

Summary of changes:
 src/prefs_matcher.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 63db37ff1d65e6b294819c50c1487f7fd880da2c
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 68ae94310..31362ecff 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -1496,6 +1496,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;
 
@@ -1574,6 +1575,7 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
 			alertpanel_error(_("Invalid hour."));
 			return NULL;
 		}
+		expr_to_free = TRUE;
 		break;
 
 	case CRITERIA_TEST:
@@ -1684,6 +1686,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;
 }
 
@@ -2165,14 +2170,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