Skip to content

Commit

Permalink
Merge pull request #24 from leedave/feature/fix_furi_string_release_s…
Browse files Browse the repository at this point in the history
…torage

Furi String free in storage if things fail
  • Loading branch information
leedave authored Jul 19, 2024
2 parents 2fb827d + 3212a77 commit d2cdc43
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ This code is open-source and may be used for whatever you want to do with it.
- [Flipc](flipc.org) for distributing the boilerplate
- [Nikita Vostokov](https://github.com/wosk) for code contributions
- [Alexander Rodriguez](https://github.com/squee72564) for code contributions
- [derskythe](https://github.com/derskythe) for code contributions

## Some cool projects I found using this
(love seeing it being used. Let me know if you want yours added)<br>
Expand Down
2 changes: 1 addition & 1 deletion application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ App(
fap_icon="icons/boilerplate_10px.png",
fap_icon_assets="icons",
fap_category="Misc",
fap_version="1.1",
fap_version="1.2",
)
2 changes: 1 addition & 1 deletion boilerplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#define SUBGHZ_APP_EXTENSION ".sub"
#define SUBGHZ_APP_FOLDER ANY_PATH("subghz")
#define BOILERPLATE_VERSION "1.1"
#define BOILERPLATE_VERSION "1.2"

typedef struct {
Gui* gui;
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.2
- Added fixed to clear furi_string on storage if things fail (found by derskythe)

## 1.1
- Add Version to Startscreen
- Fixed crash after furi_check on fw 0.100.3
Expand Down
2 changes: 2 additions & 0 deletions helpers/boilerplate_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ void boilerplate_read_settings(void* context) {
FURI_LOG_E(TAG, "Cannot open file %s", BOILERPLATE_SETTINGS_SAVE_PATH);
boilerplate_close_config_file(fff_file);
boilerplate_close_storage();
furi_string_free(temp_str);
return;
}

if(!flipper_format_read_header(fff_file, temp_str, &file_version)) {
FURI_LOG_E(TAG, "Missing Header Data");
boilerplate_close_config_file(fff_file);
boilerplate_close_storage();
furi_string_free(temp_str);
return;
}

Expand Down

0 comments on commit d2cdc43

Please sign in to comment.