Commit b3ea721b authored by Ian Rogers's avatar Ian Rogers Committed by Namhyung Kim
Browse files

perf symbol-elf: Add missing puts on error path



In dso__process_kernel_symbol if inserting a map fails, probably
ENOMEM, then the reference count puts were missing on the dso and map.

Signed-off-by: default avatarIan Rogers <irogers@google.com>
Reviewed-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent 830f1854
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1447,8 +1447,11 @@ static int dso__process_kernel_symbol(struct dso *dso, struct map *map,
			map__set_mapping_type(curr_map, MAPPING_TYPE__IDENTITY);
		}
		dso__set_symtab_type(curr_dso, dso__symtab_type(dso));
		if (maps__insert(kmaps, curr_map))
		if (maps__insert(kmaps, curr_map)) {
			dso__put(curr_dso);
			map__put(curr_map);
			return -1;
		}
		dsos__add(&maps__machine(kmaps)->dsos, curr_dso);
		dso__set_loaded(curr_dso);
		dso__put(*curr_dsop);