X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Frtos%2FChibiOS.c;h=84393860c1d758ae04c61ff2b21d004dbbceeeca;hp=b94e286f759c9d617cb09064a4a29acf6d3c8625;hb=7090edc813525caaade84a6322fdce89d3cd8f6a;hpb=19f219f731f29503c8e4d432935d3ea558cc1659 diff --git a/src/rtos/ChibiOS.c b/src/rtos/ChibiOS.c index b94e286f75..84393860c1 100644 --- a/src/rtos/ChibiOS.c +++ b/src/rtos/ChibiOS.c @@ -507,7 +507,12 @@ 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[]) { - *symbol_list = ChibiOS_symbol_list; + *symbol_list = malloc(sizeof(ChibiOS_symbol_list)); + + if (*symbol_list == NULL) + return ERROR_FAIL; + + memcpy(*symbol_list, ChibiOS_symbol_list, sizeof(ChibiOS_symbol_list)); return 0; }