From e4f57437f6ef0f0fc25f8ca2846ea606cb22c017 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 4 May 2019 15:01:05 +0100 Subject: Unref body when finished getting event handler Signed-off-by: Daniel Silverstone --- content/handlers/javascript/duktape/dukky.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'content') diff --git a/content/handlers/javascript/duktape/dukky.c b/content/handlers/javascript/duktape/dukky.c index a2bcad070..6d130e283 100644 --- a/content/handlers/javascript/duktape/dukky.c +++ b/content/handlers/javascript/duktape/dukky.c @@ -1343,10 +1343,14 @@ bool js_fire_event(jscontext *ctx, const char *type, struct dom_document *doc, s /* ... handlers bodynode */ if (dukky_get_current_value_of_event_handler( CTX, corestring_dom_load, body) == false) { + /* Unref the body, we don't need it any more */ + dom_node_unref(body); /* ... handlers */ duk_pop(CTX); return true; } + /* Unref the body, we don't need it any more */ + dom_node_unref(body); /* ... handlers handler bodynode */ duk_pop(CTX); } -- cgit v1.2.3