diff options
author | Greg Thelen <gthelen@google.com> | 2019-06-27 08:27:10 -0700 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-07-05 10:20:38 -0400 |
commit | a898ee06d331c9c056c85cd19bf6c6750861d2c3 (patch) | |
tree | ebfbddbc5f788e15f7f40f83e31e8226e39c03e8 | |
parent | f8d45ca8cd97cdbefba4a513fbd814efe6a645af (diff) | |
download | trace-cmd-a898ee06d331c9c056c85cd19bf6c6750861d2c3.tar.gz |
trace-cmd: Avoid using uninitialized handle
The put_together_file() 'out' error path uses uninitialized handle.
Unconditionally initialize handle.
Link: http://lore.kernel.org/linux-trace-devel/20190627152710.177848-1-gthelen@google.com
Fixes: 9ed499fccef5 ("trace-cmd: Fix record --date flag when sending tracing data to a listener")
Signed-off-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | tracecmd/trace-listen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tracecmd/trace-listen.c b/tracecmd/trace-listen.c index 3106022e..91325827 100644 --- a/tracecmd/trace-listen.c +++ b/tracecmd/trace-listen.c @@ -626,7 +626,7 @@ static void stop_all_readers(int cpus, int *pid_array) static int put_together_file(int cpus, int ofd, const char *node, const char *port, bool write_options) { - struct tracecmd_output *handle; + struct tracecmd_output *handle = NULL; char **temp_files; int cpu; int ret = -ENOMEM; |