修复心率血氧文件的读取
authorCaisking <3449750381@qq.com>
Thu, 27 Jun 2024 13:33:52 +0000 (21:33 +0800)
committerCaisking <3449750381@qq.com>
Thu, 27 Jun 2024 13:33:52 +0000 (21:33 +0800)
code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp

index 1dfd7ed..8e12861 100644 (file)
@@ -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 数据