From 3bf39f7f2ce2807d1960a2a4932ca0dd15eb139e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 24 May 2020 16:25:30 +0100 Subject: [PATCH] JS dom event binding: Squash leak of string. --- content/handlers/javascript/duktape/Event.bnd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/handlers/javascript/duktape/Event.bnd b/content/handlers/javascript/duktape/Event.bnd index aa69daac3..2c24cfa73 100644 --- a/content/handlers/javascript/duktape/Event.bnd +++ b/content/handlers/javascript/duktape/Event.bnd @@ -182,8 +182,8 @@ method Event::initEvent () cancellable = duk_get_boolean(ctx, 2); exc = dom_event_init(priv->evt, text_str, bubbles, cancellable); + dom_string_unref(text_str); if (exc != DOM_NO_ERR) { - dom_string_unref(text_str); return 0; }