linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] trace-cmd: Fix a crash on "trace-cmd reset" command
@ 2019-10-18 14:57 Tzvetomir Stoyanov (VMware)
  2019-10-18 14:57 ` [PATCH 2/2] trace-cmd: Check if ftrace file exists, before writing in it Tzvetomir Stoyanov (VMware)
  0 siblings, 1 reply; 4+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2019-10-18 14:57 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

A leftover in reset_cpu_mask() function causes a segmentation
fault of "trace-cmd reset".

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 tracecmd/trace-record.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index cfe67f9..81aca1f 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -4113,8 +4113,6 @@ static void reset_cpu_mask(void)
 
 	for_all_instances(instance)
 		write_instance_file(instance, "tracing_cpumask", buf, "cpumask");
-
-	free(buf);
 }
 
 static void reset_event_pid(void)
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-18 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 14:57 [PATCH 1/2] trace-cmd: Fix a crash on "trace-cmd reset" command Tzvetomir Stoyanov (VMware)
2019-10-18 14:57 ` [PATCH 2/2] trace-cmd: Check if ftrace file exists, before writing in it Tzvetomir Stoyanov (VMware)
2019-10-18 15:18   ` Steven Rostedt
2019-10-18 15:20   ` Valentin Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).