OpenOCD memory leak in `hwthread_update_threads()`

Update `os_free()` from `rtos/rtos.c:96` to fix memory leaks

Change-Id: Id7b4c775291b735a0b4423151c2930afce6bf0bd
Signed-off-by: Kirill Radkin <kirill.radkin@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7934
Reviewed-by: Tim Newsome <tim@sifive.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
Kirill Radkin 2023-09-25 13:10:20 +03:00 committed by Tomas Vanek
parent e5d26f1546
commit b388f4805c
1 changed files with 1 additions and 0 deletions

View File

@ -78,6 +78,7 @@ static void os_free(struct target *target)
return;
free(target->rtos->symbols);
rtos_free_threadlist(target->rtos);
free(target->rtos);
target->rtos = NULL;
}