summaryrefslogtreecommitdiffstats
path: root/drivers/nubus
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2020-10-06 10:13:43 +0800
committerAlexei Starovoitov <ast@kernel.org>2020-10-06 11:10:20 -0700
commita0f2b7acb4b1d29127ff99c714233b973afd1411 (patch)
treeba743ced8c89cd6f1ed8a44f8b443b2d79aaef6c /drivers/nubus
parentdca4121cdc48027320c95cbce8f5e81160aa4afe (diff)
downloadlinux-a0f2b7acb4b1d29127ff99c714233b973afd1411.tar.bz2
libbpf: Close map fd if init map slots failed
Previously we forgot to close the map fd if bpf_map_update_elem() failed during map slot init, which will leak map fd. Let's move map slot initialization to new function init_map_slots() to simplify the code. And close the map fd if init slot failed. Reported-by: Andrii Nakryiko <andrii.nakryiko@gmail.com> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20201006021345.3817033-2-liuhangbin@gmail.com
Diffstat (limited to 'drivers/nubus')
0 files changed, 0 insertions, 0 deletions