LKML Archive on
 help / color / Atom feed
From: tip-bot for Dan Carpenter <>
Subject: [tip:perf/core] perf script: Remove some bogus error handling
Date: Wed, 26 Jul 2017 10:24:06 -0700
Message-ID: <> (raw)
In-Reply-To: <20170722073610.nnsyiwdcfl6bhn4t@mwanda>

Commit-ID:  2ec5cab604b2bbc5abe7138b537199762bea59ce
Author:     Dan Carpenter <>
AuthorDate: Sat, 22 Jul 2017 10:36:10 +0300
Committer:  Arnaldo Carvalho de Melo <>
CommitDate: Tue, 25 Jul 2017 22:43:17 -0300

perf script: Remove some bogus error handling

If script_desc__new() fails then the current code has a NULL
dereference.  We don't actually need to do any cleanup, we can just
return NULL.

Signed-off-by: Dan Carpenter <>
Cc: Alexander Shishkin <>
Cc: Peter Zijlstra <>
Signed-off-by: Arnaldo Carvalho de Melo <>
 tools/perf/builtin-script.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index d430ff4..378f76c 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2199,16 +2199,11 @@ static struct script_desc *script_desc__findnew(const char *name)
 	s = script_desc__new(name);
 	if (!s)
-		goto out_delete_desc;
+		return NULL;
 	return s;
-	script_desc__delete(s);
-	return NULL;
 static const char *ends_with(const char *str, const char *suffix)

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-22  7:36 [PATCH] perf script: remove " Dan Carpenter
2017-07-26 17:24 ` tip-bot for Dan Carpenter [this message]

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone