aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/ChibiOS.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtos/ChibiOS.c')
-rw-r--r--src/rtos/ChibiOS.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rtos/ChibiOS.c b/src/rtos/ChibiOS.c
index 46fdca32..ba14a284 100644
--- a/src/rtos/ChibiOS.c
+++ b/src/rtos/ChibiOS.c
@@ -497,8 +497,8 @@ static int ChibiOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, cha
static int ChibiOS_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[])
{
unsigned int i;
- *symbol_list = malloc(
- sizeof(symbol_table_elem_t) * ARRAY_SIZE(ChibiOS_symbol_list));
+ *symbol_list = calloc(
+ ARRAY_SIZE(ChibiOS_symbol_list), sizeof(symbol_table_elem_t));
for (i = 0; i < ARRAY_SIZE(ChibiOS_symbol_list); i++)
(*symbol_list)[i].symbol_name = ChibiOS_symbol_list[i];