summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-05-04 15:01:05 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-05-04 15:01:15 +0100
commite4f57437f6ef0f0fc25f8ca2846ea606cb22c017 (patch)
treec7eb482568f8ff21d91973e4d07e6fd850ad9dd3 /content
parent99809ee64669da845f28808361ebd7e7dea5fd6c (diff)
downloadnetsurf-e4f57437f6ef0f0fc25f8ca2846ea606cb22c017.tar.gz
netsurf-e4f57437f6ef0f0fc25f8ca2846ea606cb22c017.tar.bz2
Unref body when finished getting event handler
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content')
-rw-r--r--content/handlers/javascript/duktape/dukky.c4
1 files changed, 4 insertions, 0 deletions
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);
}