aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 2960284d6ae1..daf95549e7b9 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -768,10 +768,6 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
768 else 768 else
769 machine = NULL; 769 machine = NULL;
770 770
771 name = malloc(PATH_MAX);
772 if (!name)
773 return -1;
774
775 dso->adjust_symbols = 0; 771 dso->adjust_symbols = 0;
776 772
777 if (strncmp(dso->name, "/tmp/perf-", 10) == 0) { 773 if (strncmp(dso->name, "/tmp/perf-", 10) == 0) {
@@ -795,6 +791,10 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
795 if (machine) 791 if (machine)
796 root_dir = machine->root_dir; 792 root_dir = machine->root_dir;
797 793
794 name = malloc(PATH_MAX);
795 if (!name)
796 return -1;
797
798 /* Iterate over candidate debug images. 798 /* Iterate over candidate debug images.
799 * Keep track of "interesting" ones (those which have a symtab, dynsym, 799 * Keep track of "interesting" ones (those which have a symtab, dynsym,
800 * and/or opd section) for processing. 800 * and/or opd section) for processing.