aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/ThreadX.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtos/ThreadX.c')
-rw-r--r--src/rtos/ThreadX.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/rtos/ThreadX.c b/src/rtos/ThreadX.c
index 19dc4636..add34b4f 100644
--- a/src/rtos/ThreadX.c
+++ b/src/rtos/ThreadX.c
@@ -155,25 +155,7 @@ static int ThreadX_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);
/* read the current thread id */
retval = target_read_buffer(rtos->target,