Re: [PATCH] perf tool: fix trivial memory leak while calling system_path()

2012-09-05 Thread liang xie
Hi Felipe, Thanks for reviewing! yeh, the check could be removed safely . For casting, it'll complain like this if removed: cc1: warnings being treated as errors util/help.c: In function ‘load_command_list’: util/help.c:190: error: passing argument 1 of ‘free’ discards qualifiers from pointer targ

Re: [PATCH] perf tool: fix trivial memory leak while calling system_path()

2012-09-05 Thread Felipe Balbi
Hi, On Wed, Sep 05, 2012 at 09:48:54PM +0800, liang xie wrote: > A trivial memory leak fix while calling system_path > > Signed-off-by: Liang Xie > --- > tools/perf/util/exec_cmd.c |6 -- > tools/perf/util/help.c |1 + > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff

[PATCH] perf tool: fix trivial memory leak while calling system_path()

2012-09-05 Thread liang xie
A trivial memory leak fix while calling system_path Signed-off-by: Liang Xie --- tools/perf/util/exec_cmd.c |6 -- tools/perf/util/help.c |1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/exec_cmd.c b/tools/perf/util/exec_cmd.c index 7adf4ad..79