These look like potential leaks.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4744 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2024-01-08 02:30:08 +00:00
parent 0fb341f378
commit 29fc728509

View File

@ -417,11 +417,15 @@ void _tf_ssb_blob_store_complete(blob_store_t* store, const char* id)
if (id)
{
JSValue id_value = JS_NewString(store->context, id);
JS_Call(store->context, store->promise[0], JS_UNDEFINED, 1, &id_value);
JSValue result = JS_Call(store->context, store->promise[0], JS_UNDEFINED, 1, &id_value);
tf_util_report_error(store->context, result);
JS_FreeValue(store->context, result);
}
else
{
JS_Call(store->context, store->promise[1], JS_UNDEFINED, 0, NULL);
JSValue result = JS_Call(store->context, store->promise[1], JS_UNDEFINED, 0, NULL);
tf_util_report_error(store->context, result);
JS_FreeValue(store->context, result);
}
tf_util_report_error(store->context, result);
JS_FreeValue(store->context, result);
@ -1662,7 +1666,9 @@ static void _tf_ssb_following_after_work(uv_work_t* work, int status)
JS_SetPropertyStr(context, entry, "ib", JS_NewInt32(context, following->out_following[i].blocked_by_count));
JS_SetPropertyStr(context, object, following->out_following[i].id, entry);
}
JS_Call(context, following->promise[0], JS_UNDEFINED, 1, &object);
JSValue result = JS_Call(context, following->promise[0], JS_UNDEFINED, 1, &object);
tf_util_report_error(context, result);
JS_FreeValue(context, result);
JS_FreeValue(context, object);
}
else
@ -1670,7 +1676,9 @@ static void _tf_ssb_following_after_work(uv_work_t* work, int status)
char buffer[256];
uv_strerror_r(status, buffer, sizeof(buffer));
JSValue message = JS_NewString(context, buffer);
JS_Call(context, following->promise[1], JS_UNDEFINED, 1, &message);
JSValue result = JS_Call(context, following->promise[1], JS_UNDEFINED, 1, &message);
tf_util_report_error(context, result);
JS_FreeValue(context, result);
JS_FreeValue(context, message);
}