Commit 59fbf9cf by Emilio Cobos Álvarez Committed by Nika Layzell

mailmap: Don't return a freed pointer, even if we return an error code

parent 97bc8988
...@@ -214,8 +214,10 @@ int git_mailmap_parse( ...@@ -214,8 +214,10 @@ int git_mailmap_parse(
cleanup: cleanup:
if (entry) if (entry)
git__free(entry); git__free(entry);
if (error < 0 && *mailmap) if (error < 0 && *mailmap) {
git_mailmap_free(*mailmap); git_mailmap_free(*mailmap);
*mailmap = NULL;
}
return error; return error;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment