furi_string_free

This commit is contained in:
RogueMaster
2022-10-07 03:00:38 -04:00
parent 8186b84251
commit 3cd01b03e9
12 changed files with 21 additions and 21 deletions

View File

@@ -72,7 +72,7 @@ void nfc_scene_mf_ultralight_emulate_widget_config(Nfc* nfc, bool auth_attempted
widget_add_string_multiline_element( widget_add_string_multiline_element(
widget, 56, 31, AlignLeft, AlignTop, FontPrimary, furi_string_get_cstr(info_str)); widget, 56, 31, AlignLeft, AlignTop, FontPrimary, furi_string_get_cstr(info_str));
string_clear(info_str); furi_string_free(info_str);
if(auth_attempted) { if(auth_attempted) {
widget_add_button_element( widget_add_button_element(
widget, widget,

View File

@@ -158,7 +158,7 @@ static void render_callback(Canvas* const canvas, void* ctx) {
canvas_draw_str_aligned(canvas, 64, 40, AlignCenter, AlignCenter, furi_string_get_cstr(tempStr)); canvas_draw_str_aligned(canvas, 64, 40, AlignCenter, AlignCenter, furi_string_get_cstr(tempStr));
furi_string_reset(tempStr); furi_string_reset(tempStr);
string_clear(tempStr); furi_string_free(tempStr);
release_mutex((ValueMutex*)ctx, bpm_state); release_mutex((ValueMutex*)ctx, bpm_state);
} }

View File

@@ -139,7 +139,7 @@ void chip8_close_emulator(Chip8Emulator* chip8) {
furi_thread_flags_set(furi_thread_get_id(chip8->thread), WorkerEvtEnd); furi_thread_flags_set(furi_thread_get_id(chip8->thread), WorkerEvtEnd);
furi_thread_join(chip8->thread); furi_thread_join(chip8->thread);
furi_thread_free(chip8->thread); furi_thread_free(chip8->thread);
string_clear(chip8->file_path); furi_string_free(chip8->file_path);
free(chip8); free(chip8);
FURI_LOG_I("chip_8_close_emulator", "end"); FURI_LOG_I("chip_8_close_emulator", "end");
} }

View File

@@ -71,7 +71,7 @@ void chip8_scene_work_on_enter(void* context) {
app->chip8 = chip8_make_emulator(file_tmp); app->chip8 = chip8_make_emulator(file_tmp);
string_clear(file_tmp); furi_string_free(file_tmp);
chip8_set_state(app->chip8_view, chip8_get_state(app->chip8)); chip8_set_state(app->chip8_view, chip8_get_state(app->chip8));

View File

@@ -36,7 +36,7 @@ bool storage_DolphinBackup_perform(void) {
furi_string_printf(new_path, "%s/dolphin_restorer", MOVE_DST); furi_string_printf(new_path, "%s/dolphin_restorer", MOVE_DST);
storage_common_mkdir(storage, furi_string_get_cstr(new_path)); storage_common_mkdir(storage, furi_string_get_cstr(new_path));
string_clear(new_path); furi_string_free(new_path);
for(uint32_t i = 0; i < COUNT_OF(app_dirsDolphinBackup); i++) { for(uint32_t i = 0; i < COUNT_OF(app_dirsDolphinBackup); i++) {
if(i > 5) { if(i > 5) {
furi_string_printf(path_src, "%s/%s", MOVE_SRC, app_dirsDolphinBackup[i]); furi_string_printf(path_src, "%s/%s", MOVE_SRC, app_dirsDolphinBackup[i]);
@@ -51,8 +51,8 @@ bool storage_DolphinBackup_perform(void) {
} }
} }
string_clear(path_src); furi_string_free(path_src);
string_clear(path_dst); furi_string_free(path_dst);
furi_record_close(RECORD_STORAGE); furi_record_close(RECORD_STORAGE);
@@ -77,7 +77,7 @@ static bool storage_DolphinBackup_check(void) {
} }
} }
string_clear(path); furi_string_free(path);
furi_record_close(RECORD_STORAGE); furi_record_close(RECORD_STORAGE);

View File

@@ -33,8 +33,8 @@ bool drestorer_perform(void) {
storage_common_copy(storage, furi_string_get_cstr(path_src), furi_string_get_cstr(path_dst)); storage_common_copy(storage, furi_string_get_cstr(path_src), furi_string_get_cstr(path_dst));
} }
string_clear(path_src); furi_string_free(path_src);
string_clear(path_dst); furi_string_free(path_dst);
furi_record_close(RECORD_STORAGE); furi_record_close(RECORD_STORAGE);
@@ -59,7 +59,7 @@ static bool drestorer_check(void) {
} }
} }
string_clear(path); furi_string_free(path);
furi_record_close(RECORD_STORAGE); furi_record_close(RECORD_STORAGE);

View File

@@ -151,7 +151,7 @@ static void dtmf_dolphin_dialer_draw_callback(Canvas* canvas, void* _model) {
elements_multiline_text( elements_multiline_text(
canvas, (max_span * DTMF_DOLPHIN_BUTTON_WIDTH) + 4, 21, furi_string_get_cstr(output)); canvas, (max_span * DTMF_DOLPHIN_BUTTON_WIDTH) + 4, 21, furi_string_get_cstr(output));
string_clear(output); furi_string_free(output);
} }
static bool dtmf_dolphin_dialer_input_callback(InputEvent* event, void* context) { static bool dtmf_dolphin_dialer_input_callback(InputEvent* event, void* context) {

View File

@@ -125,7 +125,7 @@ static void render_callback(Canvas* const canvas, void* ctx) {
canvas, 8, 36, 112, (float)metronome_state->current_beat / metronome_state->beats_per_bar); canvas, 8, 36, 112, (float)metronome_state->current_beat / metronome_state->beats_per_bar);
// cleanup // cleanup
string_clear(tempStr); furi_string_free(tempStr);
release_mutex((ValueMutex*)ctx, metronome_state); release_mutex((ValueMutex*)ctx, metronome_state);
} }

View File

@@ -83,7 +83,7 @@ static void render_callback(Canvas* const canvas, void* ctx) {
furi_string_printf(tempStr, "Mines: %d", MINECOUNT - minesweeper_state->flags_set); furi_string_printf(tempStr, "Mines: %d", MINECOUNT - minesweeper_state->flags_set);
canvas_set_font(canvas, FontSecondary); canvas_set_font(canvas, FontSecondary);
canvas_draw_str_aligned(canvas, 0, 0, AlignLeft, AlignTop, furi_string_get_cstr(tempStr)); canvas_draw_str_aligned(canvas, 0, 0, AlignLeft, AlignTop, furi_string_get_cstr(tempStr));
string_clear(tempStr); furi_string_free(tempStr);
int seconds = 0; int seconds = 0;
int minutes = 0; int minutes = 0;
if (minesweeper_state->game_started) { if (minesweeper_state->game_started) {
@@ -94,7 +94,7 @@ static void render_callback(Canvas* const canvas, void* ctx) {
} }
furi_string_printf(tempStr, "%01d:%02d", minutes, seconds); furi_string_printf(tempStr, "%01d:%02d", minutes, seconds);
canvas_draw_str_aligned(canvas, 128, 0, AlignRight, AlignTop, furi_string_get_cstr(tempStr)); canvas_draw_str_aligned(canvas, 128, 0, AlignRight, AlignTop, furi_string_get_cstr(tempStr));
string_clear(tempStr); furi_string_free(tempStr);
for (int y = 0; y < PLAYFIELD_HEIGHT; y++) { for (int y = 0; y < PLAYFIELD_HEIGHT; y++) {
for (int x = 0; x < PLAYFIELD_WIDTH; x++) { for (int x = 0; x < PLAYFIELD_WIDTH; x++) {
@@ -216,7 +216,7 @@ static void render_callback(Canvas* const canvas, void* ctx) {
} }
} }
} }
string_clear(tempStr); furi_string_free(tempStr);
release_mutex((ValueMutex*)ctx, minesweeper_state); release_mutex((ValueMutex*)ctx, minesweeper_state);
} }
@@ -305,7 +305,7 @@ static bool game_won(Minesweeper* minesweeper_state) {
DialogMessageButton choice = dialog_message_show(dialogs, message); DialogMessageButton choice = dialog_message_show(dialogs, message);
dialog_message_free(message); dialog_message_free(message);
string_clear(tempStr); furi_string_free(tempStr);
furi_string_reset(tempStr); furi_string_reset(tempStr);
furi_record_close(RECORD_DIALOGS); furi_record_close(RECORD_DIALOGS);
return choice == DialogMessageButtonCenter; return choice == DialogMessageButtonCenter;

View File

@@ -56,7 +56,7 @@ static void tama_p1_hal_log(log_level_t level, char* buff, ...) {
break; break;
} }
string_clear(string); furi_string_free(string);
} }
static void tama_p1_hal_sleep_until(timestamp_t ts) { static void tama_p1_hal_sleep_until(timestamp_t ts) {

View File

@@ -115,7 +115,7 @@ void totp_config_file_load_base(PluginState* const plugin_state) {
FURI_LOG_D(LOGGING_TAG, "Missing timezone offset information, defaulting to 0"); FURI_LOG_D(LOGGING_TAG, "Missing timezone offset information, defaulting to 0");
} }
string_clear(temp_str); furi_string_free(temp_str);
totp_close_config_file(fff_data_file); totp_close_config_file(fff_data_file);
totp_close_storage(); totp_close_storage();
} }
@@ -184,7 +184,7 @@ void totp_config_file_load_tokens(PluginState* const plugin_state) {
FURI_LOG_D(LOGGING_TAG, "Found %d tokens", index); FURI_LOG_D(LOGGING_TAG, "Found %d tokens", index);
string_clear(temp_str); furi_string_free(temp_str);
totp_close_config_file(fff_data_file); totp_close_config_file(fff_data_file);
totp_close_storage(); totp_close_storage();

View File

@@ -74,7 +74,7 @@ void wifi_deauther_app_free(WifideautherApp* app) {
view_dispatcher_remove_view(app->view_dispatcher, WifideautherAppViewConsoleOutput); view_dispatcher_remove_view(app->view_dispatcher, WifideautherAppViewConsoleOutput);
view_dispatcher_remove_view(app->view_dispatcher, WifideautherAppViewTextInput); view_dispatcher_remove_view(app->view_dispatcher, WifideautherAppViewTextInput);
text_box_free(app->text_box); text_box_free(app->text_box);
string_clear(app->text_box_store); furi_string_free(app->text_box_store);
text_input_free(app->text_input); text_input_free(app->text_input);
// View dispatcher // View dispatcher