From: Daniel Carl Date: Sat, 21 Jun 2014 13:13:34 +0000 (+0200) Subject: Fixed potential memory leak. X-Git-Url: https://git.owens.tech/style.css/style.css/git?a=commitdiff_plain;h=57c479199f5a81e17c667fea42b19f3e49bd9955;p=vimb.git Fixed potential memory leak. --- 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) {