Andrii Nakryiko <andriin@xxxxxx> writes: > Factor out map creation and destruction logic to simplify code and especially > error handling. Also fix map FD leak in case of partially successful map > creation during bpf_object load operation. > > Cc: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> > Fixes: 57a00f41644f ("libbpf: Add auto-pinning of maps when loading BPF objects") > Signed-off-by: Andrii Nakryiko <andriin@xxxxxx> Good catch on the fd leak! Acked-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>