mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-14 19:53:35 -07:00
Merge branch 'dev' into fix-read-in-readraw-crash
This commit is contained in:
@@ -58,7 +58,7 @@ MU_TEST(storage_file_open_lock) {
|
||||
storage_file_close(file);
|
||||
|
||||
// file_locker thread stop
|
||||
mu_check(furi_thread_join(locker_thread) == FuriStatusOk);
|
||||
mu_check(furi_thread_join(locker_thread));
|
||||
furi_thread_free(locker_thread);
|
||||
|
||||
// clean data
|
||||
@@ -148,7 +148,7 @@ MU_TEST(storage_dir_open_lock) {
|
||||
storage_dir_close(file);
|
||||
|
||||
// file_locker thread stop
|
||||
mu_check(furi_thread_join(locker_thread) == FuriStatusOk);
|
||||
mu_check(furi_thread_join(locker_thread));
|
||||
furi_thread_free(locker_thread);
|
||||
|
||||
// clean data
|
||||
|
||||
@@ -38,7 +38,6 @@ void lfrfid_scene_write_on_enter(void* context) {
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup);
|
||||
|
||||
size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id);
|
||||
app->old_key_data = (uint8_t*)malloc(size);
|
||||
protocol_dict_get_data(app->dict, app->protocol_id, app->old_key_data, size);
|
||||
|
||||
lfrfid_worker_start_thread(app->lfworker);
|
||||
@@ -92,5 +91,4 @@ void lfrfid_scene_write_on_exit(void* context) {
|
||||
|
||||
size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id);
|
||||
protocol_dict_set_data(app->dict, app->protocol_id, app->old_key_data, size);
|
||||
free(app->old_key_data);
|
||||
}
|
||||
|
||||
+5
-3
@@ -93,14 +93,16 @@ static void furi_thread_body(void* context) {
|
||||
thread->name ? thread->name : "<unknown service>");
|
||||
}
|
||||
|
||||
// clear thread local storage
|
||||
// flush stdout
|
||||
__furi_thread_stdout_flush(thread);
|
||||
furi_assert(pvTaskGetThreadLocalStoragePointer(NULL, 0) != NULL);
|
||||
vTaskSetThreadLocalStoragePointer(NULL, 0, NULL);
|
||||
|
||||
// from here we can't use thread pointer
|
||||
furi_thread_set_state(thread, FuriThreadStateStopped);
|
||||
|
||||
// clear thread local storage
|
||||
furi_assert(pvTaskGetThreadLocalStoragePointer(NULL, 0) != NULL);
|
||||
vTaskSetThreadLocalStoragePointer(NULL, 0, NULL);
|
||||
|
||||
vTaskDelete(NULL);
|
||||
furi_thread_catch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user