From c52fbbbb8d76153bca6482419151ecf19aea06e5 Mon Sep 17 00:00:00 2001 From: Roberto Arellano Date: Thu, 8 Aug 2024 15:46:11 -0600 Subject: [PATCH] fix: allocation size for file item --- firmware/main/modules/file_manager/file_manager_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/main/modules/file_manager/file_manager_module.c b/firmware/main/modules/file_manager/file_manager_module.c index 21bac99a..ada08dd2 100644 --- a/firmware/main/modules/file_manager/file_manager_module.c +++ b/firmware/main/modules/file_manager/file_manager_module.c @@ -96,7 +96,7 @@ static void update_files() { uint16_t idx = 0; while ((entry = readdir(dir)) != NULL) { if (entry->d_type == DT_REG || entry->d_type == DT_DIR) { - file_item_t* item = malloc(sizeof(file_item_t*)); // check false + file_item_t* item = malloc(sizeof(file_item_t)); // check false item->is_dir = (entry->d_type == DT_DIR); item->name = strdup(entry->d_name); // check false size_t path_len =