|
From: tip-bot f. M. H. <mhi...@re...> - 2010-04-02 19:08:40
|
Commit-ID: c9e385826d4f1ca5a72005ab8503598f791a8dc0 Gitweb: http://git.kernel.org/tip/c9e385826d4f1ca5a72005ab8503598f791a8dc0 Author: Masami Hiramatsu <mhi...@re...> AuthorDate: Fri, 2 Apr 2010 12:50:45 -0400 Committer: Ingo Molnar <mi...@el...> CommitDate: Fri, 2 Apr 2010 19:35:42 +0200 perf probe: Fix not to return non-matched file Fix cu_find_realpath() not to return the last file path if that is not matched to input pattern. Signed-off-by: Masami Hiramatsu <mhi...@re...> Cc: Paul Mackerras <pa...@sa...> Cc: Arnaldo Carvalho de Melo <ac...@re...> Cc: Peter Zijlstra <pe...@in...> Cc: Mike Galbraith <ef...@gm...> Cc: Frederic Weisbecker <fwe...@gm...> Cc: systemtap <sys...@so...> Cc: DLE <dle...@li...> LKML-Reference: <20100402165045.23551.47780.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mi...@el...> --- tools/perf/util/probe-finder.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index db52ec2..b44132e 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -183,6 +183,8 @@ static const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname) if (strtailcmp(src, fname) == 0) break; } + if (i == nfiles) + return NULL; return src; } |