diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 28106059bf12b624a309661a82373db36d017f3c..b4fe0579bd6b1d4af97ee122aef7d2a204bb1392 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -565,7 +565,7 @@ static int dso__load_sym(struct dso *self, int fd, const char *name, goto out_elf_end; secstrs = elf_getdata(sec_strndx, NULL); - if (symstrs == NULL) + if (secstrs == NULL) goto out_elf_end; nr_syms = shdr.sh_size / shdr.sh_entsize;