Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 164c800e authored by David Ahern's avatar David Ahern Committed by Arnaldo Carvalho de Melo
Browse files

perf symbols: Move name malloc to when needed in dso__load

parent 9811360e
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -768,10 +768,6 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
	else
	else
		machine = NULL;
		machine = NULL;


	name = malloc(PATH_MAX);
	if (!name)
		return -1;

	dso->adjust_symbols = 0;
	dso->adjust_symbols = 0;


	if (strncmp(dso->name, "/tmp/perf-", 10) == 0) {
	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)
	if (machine)
	if (machine)
		root_dir = machine->root_dir;
		root_dir = machine->root_dir;


	name = malloc(PATH_MAX);
	if (!name)
		return -1;

	/* Iterate over candidate debug images.
	/* Iterate over candidate debug images.
	 * Keep track of "interesting" ones (those which have a symtab, dynsym,
	 * Keep track of "interesting" ones (those which have a symtab, dynsym,
	 * and/or opd section) for processing.
	 * and/or opd section) for processing.