Skip to content

Commit 9dc4de1

Browse files
fixup! h7 fclose issue hotfix
1 parent aa71482 commit 9dc4de1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ota/implementation/OTASTM32H7.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::startOTA() {
7575

7676

7777
OTACloudProcessInterface::State STM32H7OTACloudProcess::flashOTA() {
78-
storageClean();
78+
fclose(decompressed);
7979

8080
/* Schedule the firmware update. */
8181
if(!storageOpen()) {
8282
return OtaStorageOpenFail;
8383
}
8484

85+
storageClean();
86+
8587
// this sets the registries in RTC to load the firmware from the storage selected at the next reboot
8688
STM32H747::writeBackupRegister(RTCBackup::DR0, 0x07AA);
8789
STM32H747::writeBackupRegister(RTCBackup::DR1, storage);

0 commit comments

Comments
 (0)