[PATCH 6.1 141/600] libbpf: Fix realloc API handling in zero-sized edge cases