From: Wenji Huang Date: Wed, 24 Feb 2010 07:40:26 +0000 (+0800) Subject: tracing: Simplify memory recycle of trace_define_field X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7b60997f73865b019e595720185c85285ca3df9a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git tracing: Simplify memory recycle of trace_define_field Discard freeing field->type since it is not necessary. Reviewed-by: Li Zefan Signed-off-by: Wenji Huang LKML-Reference: <1266997226-6833-5-git-send-email-wenji.huang@oracle.com> Signed-off-by: Steven Rostedt --- 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;