From a0af058f5e32218f30937d89dd0541fecc7a7420 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 10 Jan 2024 02:49:44 +0000 Subject: [PATCH] Don't leak promises. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4752 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/ssb.js.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ssb.js.c b/src/ssb.js.c index 1df7ff84..4f4ab00e 100644 --- a/src/ssb.js.c +++ b/src/ssb.js.c @@ -1682,6 +1682,9 @@ static void _tf_ssb_following_after_work(uv_work_t* work, int status) JS_FreeValue(context, message); } + JS_FreeValue(context, following->promise[0]); + JS_FreeValue(context, following->promise[1]); + for (int i = 0; i < following->ids_count; i++) { tf_free((void*)following->ids[i]);