summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2010-02-24 08:40:26 +0100
committerSteven Rostedt <rostedt@goodmis.org>2010-02-25 16:42:55 +0100
commit7b60997f73865b019e595720185c85285ca3df9a (patch)
tree4b441b810a31484cf28621b7690dadcf71a19e3e /kernel/trace
parenttracing: Remove unnecessary variable in print_graph_return (diff)
downloadlinux-7b60997f73865b019e595720185c85285ca3df9a.tar.xz
linux-7b60997f73865b019e595720185c85285ca3df9a.zip
tracing: Simplify memory recycle of trace_define_field
Discard freeing field->type since it is not necessary. Reviewed-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Wenji Huang <wenji.huang@oracle.com> LKML-Reference: <1266997226-6833-5-git-send-email-wenji.huang@oracle.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_events.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index c2a3077b7353..3f972ad98d04 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -60,10 +60,8 @@ int trace_define_field(struct ftrace_event_call *call, const char *type,
return 0;
err:
- if (field) {
+ if (field)
kfree(field->name);
- kfree(field->type);
- }
kfree(field);
return -ENOMEM;