[Commits] [SCM] claws branch, master, updated. 3.18.0-156-g5b1a3ab9d

jonathan at claws-mail.org jonathan at claws-mail.org
Sun Sep 26 05:48:15 CEST 2021


The branch, master has been updated
       via  5b1a3ab9df6341785aab28584454b05be3ad7042 (commit)
       via  a4bf73918d3e97dcb75aac791d1aa445e59db85e (commit)
       via  021be06b3cbc888d2b66b5dad9ab96de78c204fc (commit)
      from  448bb734cee352dad13e4c0cdc226e0580f707c6 (commit)

Summary of changes:
 src/gtk/gtkutils.c           | 9 +++++++--
 src/plugins/pgpcore/sgpgme.c | 3 +--
 src/textview.c               | 9 +++++----
 3 files changed, 13 insertions(+), 8 deletions(-)


- Log -----------------------------------------------------------------
commit 5b1a3ab9df6341785aab28584454b05be3ad7042
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Fri Sep 24 08:21:06 2021 -0700

    Fix memory leak

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index dc69ede9b..4b5a87e79 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1087,6 +1087,8 @@ GtkWidget *xface_get_from_header(const gchar *o_xface)
 {
 	static gchar *xpm_xface[XPM_XFACE_HEIGHT];
 	static gboolean xpm_xface_init = TRUE;
+	GdkPixbuf *pixbuf;
+	GtkWidget *ret;
 	gchar xface[2048];
 	
 	if (o_xface == NULL)
@@ -1112,8 +1114,11 @@ GtkWidget *xface_get_from_header(const gchar *o_xface)
 
 	create_xpm_from_xface(xpm_xface, xface);
 
-	return gtk_image_new_from_pixbuf(
-		gdk_pixbuf_new_from_xpm_data((const char **)xpm_xface));
+	pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)xpm_xface);
+	ret = gtk_image_new_from_pixbuf(pixbuf);
+	g_object_unref(pixbuf);
+
+	return ret;
 }
 #endif
 

commit a4bf73918d3e97dcb75aac791d1aa445e59db85e
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Fri Sep 24 04:57:54 2021 -0700

    Fix memory leak

diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c
index 9afd2825e..4540f4ed6 100644
--- a/src/plugins/pgpcore/sgpgme.c
+++ b/src/plugins/pgpcore/sgpgme.c
@@ -401,8 +401,7 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status)
 				key->uids = key->uids ? key->uids->next : NULL;
 				while (key->uids != NULL) {
 					g_string_append_printf(siginfo,
-						g_strconcat("                    ",
-							    _("uid \"%s\" (Validity: %s)\n"), NULL),
+						_("                    uid \"%s\" (Validity: %s)\n"),
 						key->uids->uid,
 						key->uids->revoked==TRUE?_("Revoked"):get_validity_str(key->uids->validity));
 					j++;

commit 021be06b3cbc888d2b66b5dad9ab96de78c204fc
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Fri Sep 24 04:47:46 2021 -0700

    Fix memory leak

diff --git a/src/textview.c b/src/textview.c
index c4fbf9e4a..4508f1ad5 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -2613,14 +2613,14 @@ static void textview_set_font_zoom(TextView *textview)
 	PangoFontDescription *font;
 	gint size;
 
+	/* do nothing if no zoom level has been set */
+	if (textview_font_size_percent == TEXTVIEW_FONT_SIZE_UNSET)
+		return;
+
 	font = pango_font_description_from_string
 						(prefs_common.textfont);
 	cm_return_if_fail(font);
 
-	/* do nothing is no zoom level has been set */
-	if (textview_font_size_percent == TEXTVIEW_FONT_SIZE_UNSET)
-		return;
-
 	if (textview_font_size_default == TEXTVIEW_FONT_SIZE_UNSET)
 		textview_font_size_default = pango_font_description_get_size(font);
 
@@ -2628,6 +2628,7 @@ static void textview_set_font_zoom(TextView *textview)
 
 	pango_font_description_set_size(font, size);
 	gtk_widget_modify_font(textview->text, font);
+	pango_font_description_free(font);
 }
 
 static void textview_zoom(GtkWidget *widget, gboolean zoom_in)

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list