X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Frtos%2FembKernel.c;h=76c0bd23b2857722cfd7e1464ba8acfe5d2be16b;hp=f605deb3c5bd77386be1f39e1d48abc97bd66017;hb=d36889e692788d4dc4acabd073d57f4a178e3172;hpb=bc1340cf0b9aa28c03d1b07c54b6e0bf4a483351 diff --git a/src/rtos/embKernel.c b/src/rtos/embKernel.c index f605deb3c5..76c0bd23b2 100644 --- a/src/rtos/embKernel.c +++ b/src/rtos/embKernel.c @@ -206,25 +206,7 @@ static int embKernel_update_threads(struct rtos *rtos) } /* wipe out previous thread details if any */ - if (rtos->thread_details != NULL) { - int j; - for (j = 0; j < rtos->thread_count; j++) { - if (rtos->thread_details[j].display_str != NULL) { - free(rtos->thread_details[j].display_str); - rtos->thread_details[j].display_str = NULL; - } - if (rtos->thread_details[j].thread_name_str != NULL) { - free(rtos->thread_details[j].thread_name_str); - rtos->thread_details[j].thread_name_str = NULL; - } - if (rtos->thread_details[j].extra_info_str != NULL) { - free(rtos->thread_details[j].extra_info_str); - rtos->thread_details[j].extra_info_str = NULL; - } - } - free(rtos->thread_details); - rtos->thread_details = NULL; - } + rtos_free_threadlist(rtos); param = (const struct embKernel_params *) rtos->rtos_specific_params;