commit | 610b48624d02558346c4835b2f224f48811448e6 | [log] [tgz] |
---|---|---|
author | l.yang <l.yang@mobiletek.cn> | Thu Aug 08 10:26:41 2024 +0800 |
committer | l.yang <l.yang@mobiletek.cn> | Thu Aug 08 10:26:41 2024 +0800 |
tree | 801d285f0351dbc78f57e2edfd495950c075d92f | |
parent | 1b4a7f4f818ded66bedf1bdea08aeceacfc7d8a2 [diff] |
[Bugfix][T106][task-view-57]Solve file handle may not right close Only Configure: No Affected branch: master Affected module: FOTA Is it affected on both ZXIC and MTK: ZXIC Self-test: Yes Doc Update: No Change-Id: Ide89d4280cb42433646904fd17342aa26a37e125
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp index 5fff5eb..c2e7d1d 100755 --- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp +++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp
@@ -144,9 +144,11 @@ if(ret < 0 ) { LYERRLOG("A/B sync system failed \n"); + fclose(fp); return -1; } LYINFLOG("A/B sync system success,record current sys \n"); + fclose(fp); fp = fopen(FOTA_CURRENT_SYS,"w"); if(fp == NULL) { @@ -158,7 +160,6 @@ fclose(fp); system("sync"); - return 0; } } @@ -178,6 +179,7 @@ if(current_sys < 0) { LYERRLOG("Get current system failed %d\n",current_sys); + fclose(fp); return -1; }