lkml.org 
[lkml]   [2010]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip:tracing/core] tracing: Simplify memory recycle of trace_define_field
    Commit-ID:  7b60997f73865b019e595720185c85285ca3df9a
    Gitweb: http://git.kernel.org/tip/7b60997f73865b019e595720185c85285ca3df9a
    Author: Wenji Huang <wenji.huang@oracle.com>
    AuthorDate: Wed, 24 Feb 2010 15:40:26 +0800
    Committer: Steven Rostedt <rostedt@goodmis.org>
    CommitDate: Thu, 25 Feb 2010 10:42:55 -0500

    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>
    ---
    kernel/trace/trace_events.c | 4 +---
    1 files changed, 1 insertions(+), 3 deletions(-)

    diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
    index c2a3077..3f972ad 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;

    \
     
     \ /
      Last update: 2010-02-26 10:31    [W:0.029 / U:3.304 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site