From a1ea7f2764e574b9dcf5babfcd4060b5ce067205 Mon Sep 17 00:00:00 2001 From: yangbiao59 Date: Tue, 5 Aug 2025 08:31:42 +0000 Subject: [PATCH] =?UTF-8?q?1.1fdatasync=E4=BF=9D=E8=AF=81fdatasync=5Freq?= =?UTF-8?q?=E4=B8=8D=E6=8A=9B=E5=87=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangbiao59 --- interfaces/kits/js/src/mod_fs/properties/fdatasync.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/kits/js/src/mod_fs/properties/fdatasync.cpp b/interfaces/kits/js/src/mod_fs/properties/fdatasync.cpp index c50b00950..ee3b06f82 100644 --- a/interfaces/kits/js/src/mod_fs/properties/fdatasync.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/fdatasync.cpp @@ -45,7 +45,7 @@ napi_value Fdatasync::Sync(napi_env env, napi_callback_info info) } std::unique_ptr fdatasync_req = { - new uv_fs_t, CommonFunc::fs_req_cleanup }; + new (nothrow) uv_fs_t, CommonFunc::fs_req_cleanup }; if (!fdatasync_req) { HILOGE("Failed to request heap memory."); NError(ENOMEM).ThrowErr(env); -- Gitee