Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1733213 > unrolled thread

[PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2017-09-16 08:20 +0200
Last post2017-09-16 08:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-09-16 08:20 +0200

#1733213 — [PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2017-09-16 08:20 +0200
Subject[PATCH] perf kmem: Perform some cleanup if '--time' is given an invalid value
Message-ID<uqeCm-60W-3@gated-at.bofh.it>
If the string passed in '--time' is invalid, we must do some cleanup
before leaving. As in the other error handling paths of this function.

Fixes: 2a865bd8dddd ("perf kmem: Add option to specify time window of interest")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 tools/perf/builtin-kmem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 24ee68ecdd42..d8f25ef8157b 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -1983,7 +1983,8 @@ int cmd_kmem(int argc, const char **argv)
 
 	if (perf_time__parse_str(&ptime, time_str) != 0) {
 		pr_err("Invalid time string\n");
-		return -EINVAL;
+		ret = -EINVAL;
+		goto out_delete;
 	}
 
 	if (!strcmp(argv[0], "stat")) {
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web