[Commits] [SCM] claws branch, master, updated. 3.16.0-253-gb9a58ed

ticho at claws-mail.org ticho at claws-mail.org
Fri Aug 3 13:41:44 CEST 2018


The branch, master has been updated
       via  b9a58ed5fb712424026b3e71e2ba42d6859f4fcd (commit)
      from  e44bccaba2f23878087f5f628a073ce6bf70d17f (commit)

Summary of changes:
 src/stock_pixmap.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit b9a58ed5fb712424026b3e71e2ba42d6859f4fcd
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Fri Aug 3 13:40:57 2018 +0200

    Fixed a memory leak in stock_pixmap_widget_with_overlay().

diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c
index 593b502..87d640a 100644
--- a/src/stock_pixmap.c
+++ b/src/stock_pixmap.c
@@ -1064,6 +1064,7 @@ GtkWidget *stock_pixmap_widget_with_overlay(StockPixmap icon,
 	data = g_new0(OverlayData, 1);
 
 	stock_wid = stock_pixmap_widget(icon);
+	g_object_ref_sink(stock_wid);
 	gtk_widget_get_requisition(stock_wid, &requisition);
 
 #if !GTK_CHECK_VERSION(3, 0, 0)
@@ -1081,7 +1082,7 @@ GtkWidget *stock_pixmap_widget_with_overlay(StockPixmap icon,
 		data->base_pixmap = stock_pixmap;
 		data->base_height = requisition.height;
 		data->base_width  = requisition.width;
-		gtk_widget_destroy(stock_wid);
+		g_object_unref(stock_wid);
 
 		if (pos == OVERLAY_NONE) {
 			data->overlay_pixmap = NULL;
@@ -1104,7 +1105,7 @@ GtkWidget *stock_pixmap_widget_with_overlay(StockPixmap icon,
 		data->base_pixbuf = stock_pixbuf;
 		data->base_height = requisition.height;
 		data->base_width  = requisition.width;
-		gtk_widget_destroy(stock_wid);
+		g_object_unref(stock_wid);
 		if (pos == OVERLAY_NONE) {
 			data->overlay_pixmap = NULL;
 		} else {

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list