trace-cmd: Fix create_recorder() path assignment
PATCH 1/1 trace-cmd: Fix create_recorder() path assignment
From: "Steven Rostedt (VMware)" <[email protected]>
The assignment of path was suppose to copy the dir variable that is returned from tracefs_tracing_dir(), but instead the path copied itself.
This broke the communication between host and guest as well as networking.
Fixes b8498696e0 ("trace-cmd: Use tracefs_tracing_dir() instead of tracefs_find_tracing_dir()")
Signed-off-by Steven Rostedt (VMware) <[email protected]>
--- tracecmd/trace-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tracecmd/trace-record.c +1 -1
@@ -3341,7 +3341,7 @@ static int create_recorder(struct buffer_instance *instance, int cpu,const char *dir =tracefs_tracing_dir ();if (dir) - path =strdup (path); + path =strdup (dir); }if (!path)die ("can't get the tracing directory" );
Signature · 1 line
2.25.4