From: Caisking <3449750381@qq.com> Date: Thu, 27 Jun 2024 13:33:52 +0000 (+0800) Subject: 修复心率血氧文件的读取 X-Git-Tag: release_V1.2.70_20241020_135402~941 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=d3373dc8c166d4d2e26638b5125e40f0af1e2dc1;p=mirrors%2FFD230.git 修复心率血氧文件的读取 --- 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 数据