aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2011-12-27 10:35:50 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-01-03 11:37:19 -0500
commit057a174a064f68bac042d618ce3c6ea3ccd9a8aa (patch)
tree55de90f0825a2de3532f323982be720bd5b7366e /tools
parent15e6392feec311f1e409d77e1ccfe51c1d940365 (diff)
perf top: Fix a memory leak
The 'buf' should be freed when symbol wasn't found too. Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1325000151-4463-3-git-send-email-namhyung@gmail.com Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-top.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index c3836b966ccf..4f81eeb99875 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -351,7 +351,6 @@ static void perf_top__prompt_symbol(struct perf_top *top, const char *msg)
351 if (!found) { 351 if (!found) {
352 fprintf(stderr, "Sorry, %s is not active.\n", buf); 352 fprintf(stderr, "Sorry, %s is not active.\n", buf);
353 sleep(1); 353 sleep(1);
354 return;
355 } else 354 } else
356 perf_top__parse_source(top, found); 355 perf_top__parse_source(top, found);
357 356