diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-08-26 11:10:20 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-26 11:10:20 -0700 |
| commit | 528a762ca67e4be03241e8b80cde5504dc2c6432 (patch) | |
| tree | fe2cab24aff6d3b9b9497f0db4f58f6acd2bf531 /mailmap.c | |
| parent | 88639e5d4cb3e9602e25114640885cad2696caa6 (diff) | |
| parent | d98d9c77e5d9ac0b0663069e05a512037b9279cf (diff) | |
| download | git-528a762ca67e4be03241e8b80cde5504dc2c6432.tar.gz | |
Merge branch 'jc/leakfix-mailmap' into maint-2.46
Leakfix.
* jc/leakfix-mailmap:
mailmap: plug memory leak in read_mailmap_blob()
Diffstat (limited to 'mailmap.c')
| -rw-r--r-- | mailmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |
