[Commits] [SCM] claws branch, litehtml, updated. 3.17.3-102-g043c1f6

ticho at claws-mail.org ticho at claws-mail.org
Tue Jan 29 23:15:52 CET 2019


The branch, litehtml has been updated
       via  043c1f6e8668e95ce8ff779ec5275250196ef56b (commit)
      from  90592b6ea0514a28aa64cfaaa9a6619eecde54f4 (commit)

Summary of changes:
 src/plugins/litehtml_viewer/http.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 043c1f6e8668e95ce8ff779ec5275250196ef56b
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Jan 29 23:13:51 2019 +0100

    Fix a memory leak in Litehtml plugin's http loader

diff --git a/src/plugins/litehtml_viewer/http.cpp b/src/plugins/litehtml_viewer/http.cpp
index bed5638..12e8636 100644
--- a/src/plugins/litehtml_viewer/http.cpp
+++ b/src/plugins/litehtml_viewer/http.cpp
@@ -73,7 +73,7 @@ GInputStream *http::load_url(const gchar *url, GError **error)
     if (!strncmp(url, "file:///", 8) || g_file_test(url, G_FILE_TEST_EXISTS)) {
 	gchar* newurl = g_filename_from_uri(url, NULL, NULL);
 	if (g_file_get_contents(newurl ? newurl : url, &content, &len, &_error)) {
-	    stream = g_memory_input_stream_new_from_data(content, len, NULL);
+	    stream = g_memory_input_stream_new_from_data(content, len, g_free);
 	} else {
 	    debug_print("Got error: %s\n", _error->message);
 	}
@@ -88,7 +88,7 @@ GInputStream *http::load_url(const gchar *url, GError **error)
 	} else {
 	    debug_print("Image size: %d\n", data.size);
 	    stream = g_memory_input_stream_new_from_data(
-		g_memdup(data.memory, data.size), data.size, NULL);
+		g_memdup(data.memory, data.size), data.size, g_free);
 	    g_free(data.memory);
 	}
     }

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list