projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f42ff2
)
Fix memory leak
author
Michael Rasmussen
<mir@datanom.net>
Thu, 15 Nov 2018 22:12:11 +0000
(23:12 +0100)
committer
Andrej Kacian
<ticho@claws-mail.org>
Sat, 4 May 2019 14:47:53 +0000
(16:47 +0200)
Signed-off-by: Michael Rasmussen <mir@datanom.net>
src/plugins/litehtml_viewer/http.cpp
patch
|
blob
|
history
diff --git
a/src/plugins/litehtml_viewer/http.cpp
b/src/plugins/litehtml_viewer/http.cpp
index e6547ebffd9b95ecadb7e1823fea1de91d4ab596..68af73601c96dd7a3a4543b841eb89a0e8a105e0 100644
(file)
--- a/
src/plugins/litehtml_viewer/http.cpp
+++ b/
src/plugins/litehtml_viewer/http.cpp
@@
-80,8
+80,10
@@
GInputStream *http::load_url(const gchar *url, GError **error)
if (res != CURLE_OK) {
_error = g_error_new_literal(G_FILE_ERROR, res, curl_easy_strerror(res));
} else {
-
stream = g_memory_input_stream_new_from_data(g_memdup(data.memory, data.size), data.size, http::destroy_giostream
);
+
void *bytes = g_memdup(data.memory, data.size
);
g_free(data.memory);
+ stream = g_memory_input_stream_new_from_data(bytes, data.size, http::destroy_giostream);
+ g_free(bytes);
}
}