openocd/src
Christian Eggers d36889e692 RTOS: Unify wipe-out of thread list
Each RTOS implementation uses it's own (similar) code to free
the thread list. There are some additional issues:

<--->
if (pointer != NULL)
	free(pointer);
<--->
This is not necessary, free(NULL) is perfectly ok.

<--->
free(rtos->thread_details);
rtos->thread_details = NULL;
rtos->thread_count = 0;
<--->
The 3rd line has been missing for all RTOS but ChibiOs. There are paths
in the code where rtos->thread_count is never set to NULL, which can
lead to null pointer dereference of rtos->thread_details.

Change-Id: I6f7045c3d4518b925cb80dd5c907a566536b34ad
Signed-off-by: Christian Eggers <ceggers@gmx.de>
---
Changelog:
v7:
- rtos_wipe_threadlist() --> rtos_free_threadlist()
- removed non related changes in gdb_server.c from this patch
v3:
- Removed world "topic" from first line of commit message
v2:
- typo: "whipe" --> "wipe"
Reviewed-on: http://openocd.zylin.com/1916
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-03-04 20:13:58 +00:00
..
flash fm3: fix erase flash fail on using High Level Adapters. 2014-02-24 12:10:01 +00:00
helper command: Fix formatting for empty usage string 2014-01-09 13:21:51 +00:00
jtag drivers/jtag: usb_blaster: make command handlers more strict 2014-02-24 12:09:15 +00:00
pld update files to correct FSF address 2013-06-05 19:52:42 +00:00
rtos RTOS: Unify wipe-out of thread list 2014-03-04 20:13:58 +00:00
server gdb_server: Fix confusing warning when entering noack mode 2014-02-06 22:20:29 +00:00
svf svf: off-by-one error; do not access after the allocated memory 2013-09-13 19:34:46 +00:00
target mips32: build register cache in a more clear way 2014-02-24 12:10:29 +00:00
transport update files to correct FSF address 2013-06-05 19:52:42 +00:00
xsvf update files to correct FSF address 2013-06-05 19:52:42 +00:00
hello.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
hello.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
main.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
Makefile.am cmsis-dap: add initial cmsis-dap support 2014-01-09 15:20:51 +00:00
openocd.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
openocd.h update files to correct FSF address 2013-06-05 19:52:42 +00:00