All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
	hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl,
	namhyung.kim@lge.com, namhyung@kernel.org, jolsa@redhat.com,
	dsahern@gmail.com, tglx@linutronix.de
Subject: [tip:perf/core] perf record: Fixup return path of cmd_record()
Date: Thu, 21 Mar 2013 04:44:07 -0700	[thread overview]
Message-ID: <tip-8fa60e1fbaecd2e652abe41f68a934c1759663f3@git.kernel.org> (raw)
In-Reply-To: <1363326533-3310-4-git-send-email-namhyung@kernel.org>

Commit-ID:  8fa60e1fbaecd2e652abe41f68a934c1759663f3
Gitweb:     http://git.kernel.org/tip/8fa60e1fbaecd2e652abe41f68a934c1759663f3
Author:     Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Fri, 15 Mar 2013 14:48:51 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 15 Mar 2013 13:06:11 -0300

perf record: Fixup return path of cmd_record()

The error path of calling perf_target__parse_uid wrongly went to
out_free_fd.  Also add missing evlist cleanup routines.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1363326533-3310-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 80cc3ea..9f2344a 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1028,7 +1028,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
 		ui__error("%s", errbuf);
 
 		err = -saved_errno;
-		goto out_free_fd;
+		goto out_symbol_exit;
 	}
 
 	err = -ENOMEM;
@@ -1059,6 +1059,9 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
 	}
 
 	err = __cmd_record(&record, argc, argv);
+
+	perf_evlist__munmap(evsel_list);
+	perf_evlist__close(evsel_list);
 out_free_fd:
 	perf_evlist__delete_maps(evsel_list);
 out_symbol_exit:

  reply	other threads:[~2013-03-21 11:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  5:48 [PATCH 1/6] perf evlist: Introduce perf_evlist__close() Namhyung Kim
2013-03-15  5:48 ` [PATCH 2/6] perf evsel: Cleanup perf_evsel__exit() Namhyung Kim
2013-03-21 11:40   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-03-15  5:48 ` [PATCH 3/6] perf trace: Free evlist resources properly on return path Namhyung Kim
2013-03-21 11:42   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-03-15  5:48 ` [PATCH 4/6] perf record: Fixup return path of cmd_record() Namhyung Kim
2013-03-21 11:44   ` tip-bot for Namhyung Kim [this message]
2013-03-15  5:48 ` [PATCH 5/6] perf test: Fixup return path of open-syscall-tp-fields test case Namhyung Kim
2013-03-21 11:45   ` [tip:perf/core] perf tests: " tip-bot for Namhyung Kim
2013-03-15  5:48 ` [PATCH 6/6] perf test: Fixup return path of perf record " Namhyung Kim
2013-03-21 11:46   ` [tip:perf/core] perf tests: " tip-bot for Namhyung Kim
2013-03-21 11:41 ` [tip:perf/core] perf evlist: Introduce perf_evlist__close() tip-bot for Namhyung Kim

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-8fa60e1fbaecd2e652abe41f68a934c1759663f3@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.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.