diff --git a/applications/plugins/subbrute/helpers/subbrute_worker.c b/applications/plugins/subbrute/helpers/subbrute_worker.c index d96461aa1..369ffd81c 100644 --- a/applications/plugins/subbrute/helpers/subbrute_worker.c +++ b/applications/plugins/subbrute/helpers/subbrute_worker.c @@ -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); diff --git a/applications/plugins/subbrute/subbrute.c b/applications/plugins/subbrute/subbrute.c index cacb2e68c..0393335ab 100644 --- a/applications/plugins/subbrute/subbrute.c +++ b/applications/plugins/subbrute/subbrute.c @@ -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");