From f2fd97d9c5a8b98b9570233b011959d8344a9577 Mon Sep 17 00:00:00 2001 From: derskythe Date: Mon, 26 Sep 2022 02:36:38 +0400 Subject: [PATCH] fix memory leaks --- applications/plugins/subbrute/helpers/subbrute_worker.c | 2 ++ applications/plugins/subbrute/subbrute_device.c | 1 + 2 files changed, 3 insertions(+) diff --git a/applications/plugins/subbrute/helpers/subbrute_worker.c b/applications/plugins/subbrute/helpers/subbrute_worker.c index 2e27638cc..c77dacfbf 100644 --- a/applications/plugins/subbrute/helpers/subbrute_worker.c +++ b/applications/plugins/subbrute/helpers/subbrute_worker.c @@ -360,6 +360,8 @@ bool subbrute_worker_manual_transmit(SubBruteWorker* instance, const char* paylo subghz_transmitter_free(instance->transmitter); instance->transmitter = NULL; + stream_clean(stream); + instance->worker_manual_mode = false; return true; diff --git a/applications/plugins/subbrute/subbrute_device.c b/applications/plugins/subbrute/subbrute_device.c index 02913d577..28b47562b 100644 --- a/applications/plugins/subbrute/subbrute_device.c +++ b/applications/plugins/subbrute/subbrute_device.c @@ -564,6 +564,7 @@ uint8_t subbrute_device_load_from_file(SubBruteDevice* instance, string_t file_p subghz_environment_free(instance->environment); subghz_receiver_free(instance->receiver); + instance->decoder_result = NULL; instance->receiver = NULL; instance->environment = NULL;