libbpf: Close fd in bpf_object__reuse_map
authorHengqi Chen <hengqi.chen@gmail.com>
Sat, 19 Mar 2022 03:05:33 +0000 (11:05 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 21 Mar 2022 14:36:52 +0000 (15:36 +0100)
commitd0f325c34c2fbe15f6774f2b628224280b571ae9
tree2e6bfcf60c1bc849dc47e8fe622f756251c8d392
parent1824d8ea75f275a5e69e5f6bc0ffe122ea9b938c
libbpf: Close fd in bpf_object__reuse_map

pin_fd is dup-ed and assigned in bpf_map__reuse_fd. Close it
in bpf_object__reuse_map after reuse.

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220319030533.3132250-1-hengqi.chen@gmail.com
tools/lib/bpf/libbpf.c