From 809b55a04774dd318f2b4da26d02feb2b3562fa2 Mon Sep 17 00:00:00 2001 From: yangbiao59 Date: Tue, 5 Aug 2025 08:18:38 +0000 Subject: [PATCH] =?UTF-8?q?create=5Frandomaccessfile=5Fcore.cpp=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0nothrow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangbiao59 --- .../js/src/mod_fs/properties/create_randomaccessfile_core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/kits/js/src/mod_fs/properties/create_randomaccessfile_core.cpp b/interfaces/kits/js/src/mod_fs/properties/create_randomaccessfile_core.cpp index fd2b0f1a6..04727be8d 100644 --- a/interfaces/kits/js/src/mod_fs/properties/create_randomaccessfile_core.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/create_randomaccessfile_core.cpp @@ -168,7 +168,7 @@ FsResult CreateRandomAccessFileCore::DoCreateRandomAccessF return FsResult::Error(EINVAL); } - unique_ptr openReq = { new uv_fs_t, FsUtils::FsReqCleanup }; + unique_ptr openReq = { new (nothrow) uv_fs_t, FsUtils::FsReqCleanup }; if (!openReq) { HILOGE("Failed to request heap memory."); return FsResult::Error(ENOMEM); -- Gitee