[Commits] [SCM] claws branch, master, updated. 3.18.0-308-gf118b01ea
jonathan at claws-mail.org
jonathan at claws-mail.org
Fri Dec 31 19:17:07 UTC 2021
The branch, master has been updated
via f118b01ea0e80bc0b2df6d8e2731686806b7a4c3 (commit)
from f2ce6d5c7b8ded30d6a4071d30c796c4f22f0f1b (commit)
Summary of changes:
src/plugins/litehtml_viewer/container_linux.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit f118b01ea0e80bc0b2df6d8e2731686806b7a4c3
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