mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2025-02-17 13:58:32 +00:00
remove extra environment alloc
This commit is contained in:
parent
91c06a2168
commit
8cc3e2f35a
2 changed files with 9 additions and 9 deletions
|
@ -43,7 +43,7 @@ SubBruteWorker* subbrute_worker_alloc() {
|
|||
instance->worker_running = false;
|
||||
instance->worker_manual_mode = false;
|
||||
|
||||
instance->environment = subghz_environment_alloc();
|
||||
//instance->environment = subghz_environment_alloc();
|
||||
instance->transmitter = NULL;
|
||||
|
||||
instance->flipper_format = flipper_format_string_alloc();
|
||||
|
@ -64,10 +64,10 @@ void subbrute_worker_free(SubBruteWorker* instance) {
|
|||
instance->transmitter = NULL;
|
||||
}
|
||||
|
||||
if(instance->environment != NULL) {
|
||||
/*if(instance->environment != NULL) {
|
||||
subghz_environment_free(instance->environment);
|
||||
instance->environment = NULL;
|
||||
}
|
||||
}*/
|
||||
|
||||
flipper_format_free(instance->flipper_format);
|
||||
|
||||
|
|
|
@ -142,12 +142,6 @@ SubBruteState* subbrute_alloc() {
|
|||
void subbrute_free(SubBruteState* instance) {
|
||||
furi_assert(instance);
|
||||
|
||||
// SubBruteDevice
|
||||
#ifdef FURI_DEBUG
|
||||
FURI_LOG_D(TAG, "free SubBruteDevice");
|
||||
#endif
|
||||
subbrute_device_free(instance->device);
|
||||
|
||||
// SubBruteWorker
|
||||
#ifdef FURI_DEBUG
|
||||
FURI_LOG_D(TAG, "free SubBruteDevice");
|
||||
|
@ -155,6 +149,12 @@ void subbrute_free(SubBruteState* instance) {
|
|||
subbrute_worker_stop(instance->worker);
|
||||
subbrute_worker_free(instance->worker);
|
||||
|
||||
// SubBruteDevice
|
||||
#ifdef FURI_DEBUG
|
||||
FURI_LOG_D(TAG, "free SubBruteDevice");
|
||||
#endif
|
||||
subbrute_device_free(instance->device);
|
||||
|
||||
// Notifications
|
||||
#ifdef FURI_DEBUG
|
||||
FURI_LOG_D(TAG, "free Notifications");
|
||||
|
|
Loading…
Add table
Reference in a new issue