If any error is noticed after the match_attr structure is allocated,
we shouldn't just return NULL from this function.
Add a fail_return label that frees the allocated structure and
returns NULL, and consistently jump there when we want to return
NULL after cleaning up.
Signed-off-by: Junio C Hamano <redacted> Signed-off-by: Stefan Beller <redacted> Signed-off-by: Brandon Williams <redacted> Signed-off-by: Junio C Hamano <redacted>