All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Wenji Huang <wenji.huang@oracle.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	rostedt@goodmis.org, lizf@cn.fujitsu.com, wenji.huang@oracle.com,
	tglx@linutronix.de
Subject: [tip:tracing/core] tracing: Simplify memory recycle of trace_define_field
Date: Fri, 26 Feb 2010 09:29:07 GMT	[thread overview]
Message-ID: <tip-7b60997f73865b019e595720185c85285ca3df9a@git.kernel.org> (raw)
In-Reply-To: <1266997226-6833-5-git-send-email-wenji.huang@oracle.com>

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;

  parent reply	other threads:[~2010-02-26  9:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24  7:40 [PATCH -tip 1/5] tracing: fix typo in prof_sysexit_enable() Wenji Huang
2010-02-24  7:40 ` [PATCH -tip 2/5] tracing: fix typo of info text in trace_kprobe.c Wenji Huang
2010-02-24  7:40   ` [PATCH -tip 3/5] tracing: remove unnecessary variable in print_graph_return Wenji Huang
2010-02-24  7:40     ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Wenji Huang
2010-02-24  7:40       ` [PATCH -tip 5/5] tracing: simplify memory recycle of trace_define_field Wenji Huang
2010-02-24  8:04         ` Li Zefan
2010-02-24  8:21           ` Wenji Huang
2010-02-24  8:26             ` Li Zefan
2010-02-26  9:29         ` tip-bot for Wenji Huang [this message]
2010-02-25  4:18       ` [PATCH -tip 4/5] tracing: return accurate value for print_graph_prologue Frederic Weisbecker
2010-02-25 15:35         ` Steven Rostedt
2010-02-26  9:28     ` [tip:tracing/core] tracing: Remove unnecessary variable in print_graph_return tip-bot for Wenji Huang
2010-02-26  9:28   ` [tip:tracing/core] tracing: Fix typo of info text in trace_kprobe.c tip-bot for Wenji Huang
2010-02-26  9:28 ` [tip:tracing/core] tracing: Fix typo in prof_sysexit_enable() tip-bot for Wenji Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-7b60997f73865b019e595720185c85285ca3df9a@git.kernel.org \
    --to=wenji.huang@oracle.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.