diff --git a/src/node_file.cc b/src/node_file.cc index 8c2a902ed83b78..44b4d4595e4455 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1559,12 +1559,12 @@ static void Unlink(const FunctionCallbackInfo& args) { if (argc > 1) { // unlink(path, req) FSReqBase* req_wrap_async = GetReqWrap(args, 1); + CHECK_NOT_NULL(req_wrap_async); ASYNC_THROW_IF_INSUFFICIENT_PERMISSIONS( env, req_wrap_async, permission::PermissionScope::kFileSystemWrite, path.ToStringView()); - CHECK_NOT_NULL(req_wrap_async); FS_ASYNC_TRACE_BEGIN1( UV_FS_UNLINK, req_wrap_async, "path", TRACE_STR_COPY(*path)) AsyncCall(env, req_wrap_async, args, "unlink", UTF8, AfterNoArgs,