mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 05:38:35 -07:00
furi_string_free
This commit is contained in:
@@ -72,7 +72,7 @@ void nfc_scene_mf_ultralight_emulate_widget_config(Nfc* nfc, bool auth_attempted
|
||||
|
||||
widget_add_string_multiline_element(
|
||||
widget, 56, 31, AlignLeft, AlignTop, FontPrimary, furi_string_get_cstr(info_str));
|
||||
string_clear(info_str);
|
||||
furi_string_free(info_str);
|
||||
if(auth_attempted) {
|
||||
widget_add_button_element(
|
||||
widget,
|
||||
|
||||
@@ -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));
|
||||
furi_string_reset(tempStr);
|
||||
|
||||
string_clear(tempStr);
|
||||
furi_string_free(tempStr);
|
||||
|
||||
release_mutex((ValueMutex*)ctx, bpm_state);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ void chip8_close_emulator(Chip8Emulator* chip8) {
|
||||
furi_thread_flags_set(furi_thread_get_id(chip8->thread), WorkerEvtEnd);
|
||||
furi_thread_join(chip8->thread);
|
||||
furi_thread_free(chip8->thread);
|
||||
string_clear(chip8->file_path);
|
||||
furi_string_free(chip8->file_path);
|
||||
free(chip8);
|
||||
FURI_LOG_I("chip_8_close_emulator", "end");
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void chip8_scene_work_on_enter(void* context) {
|
||||
|
||||
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));
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ bool storage_DolphinBackup_perform(void) {
|
||||
|
||||
furi_string_printf(new_path, "%s/dolphin_restorer", MOVE_DST);
|
||||
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++) {
|
||||
if(i > 5) {
|
||||
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);
|
||||
string_clear(path_dst);
|
||||
furi_string_free(path_src);
|
||||
furi_string_free(path_dst);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ bool drestorer_perform(void) {
|
||||
storage_common_copy(storage, furi_string_get_cstr(path_src), furi_string_get_cstr(path_dst));
|
||||
}
|
||||
|
||||
string_clear(path_src);
|
||||
string_clear(path_dst);
|
||||
furi_string_free(path_src);
|
||||
furi_string_free(path_dst);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ static void dtmf_dolphin_dialer_draw_callback(Canvas* canvas, void* _model) {
|
||||
elements_multiline_text(
|
||||
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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
// cleanup
|
||||
string_clear(tempStr);
|
||||
furi_string_free(tempStr);
|
||||
release_mutex((ValueMutex*)ctx, metronome_state);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ static void render_callback(Canvas* const canvas, void* ctx) {
|
||||
furi_string_printf(tempStr, "Mines: %d", MINECOUNT - minesweeper_state->flags_set);
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
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 minutes = 0;
|
||||
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);
|
||||
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 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);
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ static bool game_won(Minesweeper* minesweeper_state) {
|
||||
|
||||
DialogMessageButton choice = dialog_message_show(dialogs, message);
|
||||
dialog_message_free(message);
|
||||
string_clear(tempStr);
|
||||
furi_string_free(tempStr);
|
||||
furi_string_reset(tempStr);
|
||||
furi_record_close(RECORD_DIALOGS);
|
||||
return choice == DialogMessageButtonCenter;
|
||||
|
||||
@@ -56,7 +56,7 @@ static void tama_p1_hal_log(log_level_t level, char* buff, ...) {
|
||||
break;
|
||||
}
|
||||
|
||||
string_clear(string);
|
||||
furi_string_free(string);
|
||||
}
|
||||
|
||||
static void tama_p1_hal_sleep_until(timestamp_t ts) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
string_clear(temp_str);
|
||||
furi_string_free(temp_str);
|
||||
totp_close_config_file(fff_data_file);
|
||||
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);
|
||||
|
||||
string_clear(temp_str);
|
||||
furi_string_free(temp_str);
|
||||
totp_close_config_file(fff_data_file);
|
||||
totp_close_storage();
|
||||
|
||||
|
||||
@@ -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, WifideautherAppViewTextInput);
|
||||
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);
|
||||
|
||||
// View dispatcher
|
||||
|
||||
Reference in New Issue
Block a user