aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTzvetomir Stoyanov <tstoyanov@vmware.com>2019-03-11 10:33:35 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-03-12 19:24:39 -0400
commitc9fb4a66f02849594bdd72ea7fa5976d2b548e8d (patch)
tree8cdf8000ed933c9fef4273239dddcd68e4fe25ff
parentcd5618c3510568c47cc36629d8dd6e7fd5de56b6 (diff)
downloadtrace-cmd-c9fb4a66f02849594bdd72ea7fa5976d2b548e8d.tar.gz
trace-cmd: Fix "trace-cmd reset -a -d" segfault
This patch fixes a segfault when "trace-cmd reset -a -d" is executed and there is at least one ftrace instance created. Link: http://lore.kernel.org/linux-trace-devel/20190311083339.21581-3-tstoyanov@vmware.com Reviewed-by: Slavomir Kaslev <kaslevs@vmware.com> Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--tracecmd/trace-record.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index e67af106..7804ef32 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -4473,14 +4473,14 @@ void trace_reset(int argc, char **argv)
case 'a':
last_specified_all = 1;
add_all_instances();
- for_each_instance(instance) {
- instance->flags |= BUFFER_FL_KEEP;
+ for_each_instance(inst) {
+ inst->flags |= BUFFER_FL_KEEP;
}
break;
case 'd':
if (last_specified_all) {
for_each_instance(inst) {
- instance->flags &= ~BUFFER_FL_KEEP;
+ inst->flags &= ~BUFFER_FL_KEEP;
}
} else {
if (is_top_instance(instance))