[PATCH 5.7 120/376] libbpf: Refactor map creation logic and fix cleanup leak