summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/linker.c
diff options
context:
space:
mode:
authorMartynas Pumputis <m@lambda.lt>2021-07-19 19:38:37 +0200
committerAndrii Nakryiko <andrii@kernel.org>2021-07-19 15:48:20 -0700
commita21ab4c59e09c2a9994a6e393b7484e3b3f78a99 (patch)
tree5a6fd6fbc93e3cea9b9322980972ab28238da08d /tools/lib/bpf/linker.c
parent78e4a955928ef4a3e68cc371ac8c70fd150f873b (diff)
libbpf: Fix removal of inner map in bpf_object__create_map
If creating an outer map of a BTF-defined map-in-map fails (via bpf_object__create_map()), then the previously created its inner map won't be destroyed. Fix this by ensuring that the destroy routines are not bypassed in the case of a failure. Fixes: 646f02ffdd49c ("libbpf: Add BTF-defined map-in-map support") Reported-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Martynas Pumputis <m@lambda.lt> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20210719173838.423148-2-m@lambda.lt
Diffstat (limited to 'tools/lib/bpf/linker.c')
0 files changed, 0 insertions, 0 deletions