summaryrefslogtreecommitdiffstats
path: root/mailmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mailmap.c')
-rw-r--r--mailmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mailmap.c b/mailmap.c
index 2d0212f444..2acf97f307 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -201,8 +201,10 @@ static int read_mailmap_blob(struct string_list *map, const char *name)
buf = repo_read_object_file(the_repository, &oid, &type, &size);
if (!buf)
return error("unable to read mailmap object at %s", name);
- if (type != OBJ_BLOB)
+ if (type != OBJ_BLOB) {
+ free(buf);
return error("mailmap is not a blob: %s", name);
+ }
read_mailmap_string(map, buf);