mailmap: Don't return a freed pointer, even if we return an error code
diff --git a/src/mailmap.c b/src/mailmap.c
index 54ef720..850b566 100644
--- a/src/mailmap.c
+++ b/src/mailmap.c
@@ -214,8 +214,10 @@ int git_mailmap_parse(
cleanup:
if (entry)
git__free(entry);
- if (error < 0 && *mailmap)
+ if (error < 0 && *mailmap) {
git_mailmap_free(*mailmap);
+ *mailmap = NULL;
+ }
return error;
}