From cc1980bef322bfc7302e2a4bbf5c3ca9b7d8305f Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Wed, 30 Jan 2019 00:29:12 +0100 Subject: [PATCH] Fix possible memory leak Signed-off-by: Michael Rasmussen --- src/plugins/litehtml_viewer/http.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/litehtml_viewer/http.cpp b/src/plugins/litehtml_viewer/http.cpp index ff9bcad62..21e53fc86 100644 --- a/src/plugins/litehtml_viewer/http.cpp +++ b/src/plugins/litehtml_viewer/http.cpp @@ -70,11 +70,11 @@ GInputStream *http::load_url(const gchar *url, GError **error) } else { struct Data data; - data.memory = g_memory_input_stream_new(); - data.size = 0; - if (!curl) return NULL; + data.memory = g_memory_input_stream_new(); + data.size = 0; + curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&data); res = curl_easy_perform(curl); -- 2.25.1