From d3373dc8c166d4d2e26638b5125e40f0af1e2dc1 Mon Sep 17 00:00:00 2001 From: Caisking <3449750381@qq.com> Date: Thu, 27 Jun 2024 21:33:52 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E5=BF=83=E7=8E=87=E8=A1=80?= =?utf8?q?=E6=B0=A7=E6=96=87=E4=BB=B6=E7=9A=84=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/heart_blood/health_service/health_service.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp index 1dfd7edfa..8e12861f7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp @@ -109,6 +109,7 @@ namespace OHOS { printf("Failed to open JSON file.\r\n"); FILE *fp = fopen(jsonFilePath.c_str(), "wb"); + fclose(fp); return false; } @@ -131,6 +132,7 @@ namespace OHOS oxygen_root = cJSON_Parse(jsonData); } + inFile.close(); return true; } // 释放 JSON 数据 -- 2.17.1