Frederik Kriewitz <frederik at kriewitz.eu> Segmentation fault fix.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1025 b42882b7-edfa-0310-969c-e2dbd0fdcd60
__archive__
oharboe 2008-10-07 17:45:26 +00:00
parent e8e5995160
commit 2babd87916
1 changed files with 3 additions and 0 deletions

View File

@ -75,7 +75,10 @@ int handle_trace_point_command(struct command_context_s *cmd_ctx, char *cmd, cha
if (!strcmp(args[0], "clear"))
{
if (trace->trace_points)
{
free(trace->trace_points);
trace->trace_points = NULL;
}
trace->num_trace_points = 0;
trace->trace_points_size = 0;