Skip to content

Commit 59fbf9c

Browse files
emiliomystor
authored andcommitted
mailmap: Don't return a freed pointer, even if we return an error code
1 parent 97bc898 commit 59fbf9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mailmap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,10 @@ int git_mailmap_parse(
214214
cleanup:
215215
if (entry)
216216
git__free(entry);
217-
if (error < 0 && *mailmap)
217+
if (error < 0 && *mailmap) {
218218
git_mailmap_free(*mailmap);
219+
*mailmap = NULL;
220+
}
219221
return error;
220222
}
221223

0 commit comments

Comments
 (0)