From: Adrian Hunter Date: Sun, 22 Sep 2013 10:22:09 +0000 (+0300) Subject: perf machine: Fix path unpopulated in machine__create_modules() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aa7fe3b;p=linux-beck.git perf machine: Fix path unpopulated in machine__create_modules() In machine__create_modules() the 'path' char array was used in a call to symbol__restricted_filename() without always being populated. Signed-off-by: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1379845338-29637-2-git-send-email-adrian.hunter@intel.com [ Split patch removing unrelated conversion of sprintf to snprintf to perf/core ] Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 933d14f287ca..6188d2876a71 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -792,7 +792,7 @@ static int machine__create_modules(struct machine *machine) modules = path; } - if (symbol__restricted_filename(path, "/proc/modules")) + if (symbol__restricted_filename(modules, "/proc/modules")) return -1; file = fopen(modules, "r");