remove extra environment alloc

This commit is contained in:
MX 2022-09-26 23:07:53 +03:00
parent 91c06a2168
commit 8cc3e2f35a
No known key found for this signature in database
GPG key ID: 6C4C311DFD4B4AB5
2 changed files with 9 additions and 9 deletions

View file

@ -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);

View file

@ -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");