[Commits] [SCM] claws branch, master, updated. 3.18.0-178-g65b412d59

wwp at claws-mail.org wwp at claws-mail.org
Mon Sep 27 18:27:20 CEST 2021


The branch, master has been updated
       via  65b412d59d4e147cfd0a7e261a2de863f1bc1e22 (commit)
      from  b152fc03c3697d83a5ea96a901a90f265ea6ba0f (commit)

Summary of changes:
 src/prefs_toolbar.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 65b412d59d4e147cfd0a7e261a2de863f1bc1e22
Author: wwp <subscript at free.fr>
Date:   Mon Sep 27 18:26:59 2021 +0200

    Fix CID 1491085: (possible) use after free.

diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c
index d0c457dc1..1d0913a76 100644
--- a/src/prefs_toolbar.c
+++ b/src/prefs_toolbar.c
@@ -1319,13 +1319,14 @@ static void set_visible_if_not_text(GtkTreeViewColumn *col,
 		gtk_tree_model_get(model, iter,
 				   SET_ICON, &pixbuf,
 				   -1);
-		/* note getting a pixbuf from a tree model increases
+		/* note: getting a pixbuf from a tree model increases
 		 * its refcount ... */
-		if (pixbuf != NULL)
-			g_object_unref(pixbuf);
 
 		g_object_set(renderer, "visible", TRUE, NULL);
 		g_object_set(renderer, "pixbuf",  pixbuf, NULL);
+
+		if (pixbuf != NULL)
+			g_object_unref(pixbuf);
 	}
 }
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list