mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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: Ian Rogers <irogers@google.com> Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
830f1854c4
commit
b3ea721b80
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user