Fix one possible but not actually relevant leak around files, and remove an unused value from promises.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3857 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-03-07 21:57:52 +00:00
parent 41cabad264
commit 7e9460f47c
2 changed files with 9 additions and 8 deletions

View File

@ -125,6 +125,7 @@ static JSValue _file_read_file(JSContext* context, JSValueConst this_val, int ar
if (result < 0)
{
tf_task_reject_promise(task, promise, JS_ThrowInternalError(context, uv_strerror(result)));
free(req);
}
JS_FreeCString(context, file_name);
return promise_value;