[Commits] [SCM] claws branch, master, updated. 3.17.3-162-gf544f20

ticho at claws-mail.org ticho at claws-mail.org
Thu Apr 25 22:40:59 CEST 2019


The branch, master has been updated
       via  f544f20bb21e729c67b219e8d707177cbf96ff3e (commit)
      from  24d8ebd06b2740620118550ebc73af45b8392415 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/container_linux_images.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit f544f20bb21e729c67b219e8d707177cbf96ff3e
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Apr 25 22:40:31 2019 +0200

    Fix a memory leak in litehtml plugin's container_linux::load_image()

diff --git a/src/plugins/litehtml_viewer/container_linux_images.cpp b/src/plugins/litehtml_viewer/container_linux_images.cpp
index 5c6f7f6..5ef7c0c 100644
--- a/src/plugins/litehtml_viewer/container_linux_images.cpp
+++ b/src/plugins/litehtml_viewer/container_linux_images.cpp
@@ -109,7 +109,7 @@ void container_linux::load_image( const litehtml::tchar_t* src, const litehtml::
 	unlock_images_cache();
 
 	if (!found) {
-		struct FetchCtx *ctx = g_new(struct FetchCtx, 1);
+		struct FetchCtx *ctx;
 
 		/* Attached images can be loaded into cache right here. */
 		if (!strncmp(src, "cid:", 4)) {
@@ -128,6 +128,7 @@ void container_linux::load_image( const litehtml::tchar_t* src, const litehtml::
 
 		debug_print("allowing download of image from '%s'\n", src);
 
+		ctx = g_new(struct FetchCtx, 1);
 		ctx->url = g_strdup(url.c_str());
 		ctx->container = this;
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list