perf header: Fix lock/unlock imbalances when processing BPF/BTF info