tracing: Simplify memory recycle of trace_define_field
authorWenji Huang <wenji.huang@oracle.com>
Wed, 24 Feb 2010 07:40:26 +0000 (15:40 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 25 Feb 2010 15:42:55 +0000 (10:42 -0500)
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>
kernel/trace/trace_events.c

index c2a3077b7353522fa907ebeeb8a9f329c91f4174..3f972ad98d04f48926edaf6953ea74d22bd32eab 100644 (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;