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>
This commit is contained in:
Wenji Huang 2010-02-24 15:40:26 +08:00 committed by Steven Rostedt
parent c85f3a91f8
commit 7b60997f73

View File

@ -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;