diff --git a/src/target/trace.c b/src/target/trace.c index ee894f181..257e8ceb8 100644 --- a/src/target/trace.c +++ b/src/target/trace.c @@ -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;