aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2010-02-24 15:40:26 +0800
committerSteven Rostedt <rostedt@goodmis.org>2010-02-25 10:42:55 -0500
commit7b60997f73865b019e595720185c85285ca3df9a (patch)
tree4b441b810a31484cf28621b7690dadcf71a19e3e /kernel/trace/trace_events.c
parentc85f3a91f84d5a85f179c2504bb7a39370c82b41 (diff)
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/trace_events.c')
-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;

Privacy Policy