diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-08-31 15:42:52 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-31 12:38:09 -0700 |
commit | ccdd5d1eb14a6735c34428e856c0de33f1055520 (patch) | |
tree | 5f00ed2391ffc5a1281241936e183a2c53c90a42 /t/t0202-gettext-perl.sh | |
parent | Git 2.32 (diff) | |
download | tgif-ccdd5d1eb14a6735c34428e856c0de33f1055520.tar.xz |
mailmap.c: fix a memory leak in free_mailap_{info,entry}()
In the free_mailmap_entry() code added in 0925ce4d49 (Add map_user()
and clear_mailmap() to mailmap, 2009-02-08) the intent was clearly to
clear the "me" structure, but while we freed parts of the
mailmap_entry structure, we didn't free the structure itself. The same
goes for the "mailmap_info" structure.
This brings the number of SANITIZE=leak failures in t4203-mailmap.sh
down from 50 to 49. Not really progress as far as the number of
failures is concerned, but as far as I can tell this fixes all leaks
in mailmap.c itself. There's still users of it such as builtin/log.c
that call read_mailmap() without a clear_mailmap(), but that's on
them.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0202-gettext-perl.sh')
0 files changed, 0 insertions, 0 deletions