mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Free file handle after elf load
This commit is contained in:
@@ -652,7 +652,9 @@ void elf_file_free(ELFFile* elf) {
|
||||
free(elf->debug_link_info.debug_link);
|
||||
}
|
||||
|
||||
storage_file_free(elf->fd);
|
||||
if(elf->fd != NULL) {
|
||||
storage_file_free(elf->fd);
|
||||
}
|
||||
free(elf);
|
||||
}
|
||||
|
||||
@@ -783,6 +785,9 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user