X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Frtos%2FFreeRTOS.c;h=eeab1341dba3671c2a2782ab0c7684ebca91fbcf;hp=10a9b8c0ead47fa5f99924aae8023b74a25685e3;hb=7e817839f3f99601ff4c8c2f6eeb7983037e3c68;hpb=d265fa78c348b7148e417f5fd041d694c7ee51aa diff --git a/src/rtos/FreeRTOS.c b/src/rtos/FreeRTOS.c index 10a9b8c0ea..eeab1341db 100644 --- a/src/rtos/FreeRTOS.c +++ b/src/rtos/FreeRTOS.c @@ -231,7 +231,8 @@ static int FreeRTOS_update_threads( struct rtos *rtos ) // Find out how many lists are needed to be read from pxReadyTasksLists, int64_t max_used_priority = 0; retval = target_read_buffer( rtos->target, rtos->symbols[FreeRTOS_VAL_uxTopUsedPriority].address, param->pointer_width, (uint8_t *)&max_used_priority ); - + if (retval != ERROR_OK) + return retval; symbol_address_t* list_of_lists = (symbol_address_t *)malloc( sizeof( symbol_address_t ) * ( max_used_priority+1 + 5 ) );