lkml.org 
[lkml]   [2011]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -tip:perf/core 3/4] perf top: Fix a memory leak
Date
The 'buf' should be freed when symbol wasn't found too.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
tools/perf/builtin-top.c | 1 -
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)
if (!found) {
fprintf(stderr, "Sorry, %s is not active.\n", buf);
sleep(1);
- return;
} else
perf_top__parse_source(top, found);

--
1.7.6


\
 
 \ /
  Last update: 2011-12-27 16:39    [W:0.039 / U:2.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site