From 4a50466f8cc5c890439b184d80c3ad5505051b9d Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Mon, 10 Jul 2023 19:56:44 +0200 Subject: [PATCH] Revert "Free file handle after elf load" This reverts commit d325a1a43e5e43dc248f2aae5a21cf8a841a85a9. --- lib/flipper_application/elf/elf_file.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/flipper_application/elf/elf_file.c b/lib/flipper_application/elf/elf_file.c index 9f37fc4e08..fc9dd06ba8 100644 --- a/lib/flipper_application/elf/elf_file.c +++ b/lib/flipper_application/elf/elf_file.c @@ -764,9 +764,7 @@ void elf_file_free(ELFFile* elf) { free(elf->debug_link_info.debug_link); } - if(elf->fd != NULL) { - storage_file_free(elf->fd); - } + storage_file_free(elf->fd); free(elf); } @@ -897,9 +895,6 @@ ELFFileLoadStatus elf_file_load_sections(ELFFile* elf) { FURI_LOG_I(TAG, "Total size of loaded sections: %u", total_size); //-V576 } - storage_file_free(elf->fd); - elf->fd = NULL; - return status; }