From 656d8a32ea0c010616d97bdd5cfa80bb5dadad79 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 16 Jul 2024 21:39:04 +0200 Subject: [PATCH] [spidermonkey] Leak in URL --- src/ecmascript/spidermonkey/url.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ecmascript/spidermonkey/url.cpp b/src/ecmascript/spidermonkey/url.cpp index 36843ba30..fa04fe6ca 100644 --- a/src/ecmascript/spidermonkey/url.cpp +++ b/src/ecmascript/spidermonkey/url.cpp @@ -96,7 +96,9 @@ url_finalize(JS::GCContext *op, JSObject *url_obj) struct eljs_url *url = JS::GetMaybePtrFromReservedSlot(url_obj, 0); if (url) { + char *uristring = url->uri.string; done_uri(&url->uri); + mem_free_if(uristring); mem_free_if(url->hash); mem_free_if(url->host); mem_free_if(url->pathname);