]> git.sur5r.net Git - openocd/commitdiff
Frederik Kriewitz <frederik at kriewitz.eu> Segmentation fault fix.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 7 Oct 2008 17:45:26 +0000 (17:45 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 7 Oct 2008 17:45:26 +0000 (17:45 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1025 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/trace.c

index ee894f18111b975cb61a93d1b8902e01aa3c4746..257e8ceb8a767946fe655acf67b4b8d5d42fcbc9 100644 (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;