diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-02-02 00:04:56 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-02-02 00:04:56 -0500 |
commit | fcd9e061d9ea087a3c869b076217bbd131f5a13f (patch) | |
tree | 87ad8fadcdaf69d270b755b2b6a6928cfd45cad6 | |
parent | 3002fa05e4512182ddb68ee674152af93e92777c (diff) |
trace-cmd: Do not free handle on failure in create_file
The tracecmd_append_cpu_data will close the handle on failure
and this will free it. No need to free it again, in fact that will
cause glibc to complain about it.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-output.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/trace-output.c b/trace-output.c index 41477f5..207a53a 100644 --- a/trace-output.c +++ b/trace-output.c | |||
@@ -688,10 +688,8 @@ struct tracecmd_output *tracecmd_create_file(const char *output_file, | |||
688 | if (!handle) | 688 | if (!handle) |
689 | return NULL; | 689 | return NULL; |
690 | 690 | ||
691 | if (tracecmd_append_cpu_data(handle, cpus, cpu_data_files) < 0) { | 691 | if (tracecmd_append_cpu_data(handle, cpus, cpu_data_files) < 0) |
692 | free(handle); | ||
693 | return NULL; | 692 | return NULL; |
694 | } | ||
695 | 693 | ||
696 | return handle; | 694 | return handle; |
697 | } | 695 | } |