diff --git a/src/node_file.cc b/src/node_file.cc index b2e3889b412..794a9ba9120 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -2711,10 +2711,10 @@ static void ReadFileUtf8(const FunctionCallbackInfo& args) { FS_SYNC_TRACE_END(open); if (req.result < 0) { uv_fs_req_cleanup(&req); - // req will be cleaned up by scope leave. return env->ThrowUVException( static_cast(req.result), "open", nullptr, path.out()); } + uv_fs_req_cleanup(&req); } auto defer_close = OnScopeLeave([file, is_fd, &req]() {