diff mbox series

[v28,2/8] trace-cmd: Fix bug in getting tracing dir in trace-cmd agent

Message ID 20210208061743.510964-3-tz.stoyanov@gmail.com (mailing list archive)
State Accepted
Headers show
Series Timestamp synchronization of host - guest tracing session | expand

Commit Message

Tzvetomir Stoyanov (VMware) Feb. 8, 2021, 6:17 a.m. UTC
In trace-cmd agent context, when getting the tracing directory, a bug
using srtcpy() was instroduced by that commit:
 https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?id=b8498696e0e8d7b7cce8f50f92e1fa94d9127e6e

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

Patch

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index a0a0b8b5..efd96d27 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -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");