[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-367-g32f1e7daa

jonathan at claws-mail.org jonathan at claws-mail.org
Mon Nov 29 08:26:50 CET 2021


The branch, gtk3 has been updated
       via  32f1e7daade52c12f54298f1cc195e066ece4f22 (commit)
      from  01b813a45a8f006f80c3bde3266173341f2a61b1 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/container_linux.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 32f1e7daade52c12f54298f1cc195e066ece4f22
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Sun Nov 21 02:44:55 2021 -0700

    Fix memory leak found

diff --git a/src/plugins/litehtml_viewer/container_linux.cpp b/src/plugins/litehtml_viewer/container_linux.cpp
index 4a455696f..5de5086ab 100644
--- a/src/plugins/litehtml_viewer/container_linux.cpp
+++ b/src/plugins/litehtml_viewer/container_linux.cpp
@@ -134,7 +134,7 @@ void container_linux::draw_background( litehtml::uint_ptr hdc, const litehtml::b
 	{
 		GdkPixbuf *bgbmp = i->second.first;
 
-		GdkPixbuf *new_img;
+		GdkPixbuf *new_img = NULL;
 		if(bg.image_size.width != gdk_pixbuf_get_width(bgbmp) || bg.image_size.height != gdk_pixbuf_get_height(bgbmp))
 		{
 			new_img = gdk_pixbuf_scale_simple(bgbmp, bg.image_size.width, bg.image_size.height, GDK_INTERP_BILINEAR);
@@ -176,6 +176,10 @@ void container_linux::draw_background( litehtml::uint_ptr hdc, const litehtml::b
 
 		cairo_pattern_destroy(pattern);
 		cairo_surface_destroy(img);
+		if(new_img)
+		{
+			g_object_unref(new_img);
+		}
 
 	}
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list