From 57c479199f5a81e17c667fea42b19f3e49bd9955 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sat, 21 Jun 2014 15:13:34 +0200 Subject: [PATCH] Fixed potential memory leak. --- src/js.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js.c b/src/js.c index 74d025e..3766ff8 100644 --- a/src/js.c +++ b/src/js.c @@ -30,10 +30,9 @@ static gboolean evaluate_string(JSContextRef ctx, const char *script, gboolean js_eval_file(WebKitWebFrame *frame, const char *file) { char *js = NULL, *value = NULL; - GError *error = NULL; if (g_file_test(file, G_FILE_TEST_IS_REGULAR) - && g_file_get_contents(file, &js, NULL, &error) + && g_file_get_contents(file, &js, NULL, NULL) ) { gboolean success = js_eval(frame, js, file, &value); if (!success) { -- 2.20.1